• /r/csharp
  • How static analysis works with LINQ?

    Today a designer wasted few hours working with buggy application and I’ve spend around an hour catching the bug causing undesired behaviour: public void RemoveConnection(Node node) { var n = connections.FirstOrDefault(co => co.node = node); connections.Remove(n); } Bug was caused by typo which was not caught by static analysis. What are good resources on that […]

  • /r/powershell
  • Running a script using a foreach loop which goes through a list of servers… how do I recover the server names when the pipe ultimately produces output?

    So I would be using the following code in a script: $ServerList | Select-Object Server | foreach {$_.Server} | .Run-CommandMultiThreaded.ps1 -command “Get-Service” -InputParam ComputerName | Where-Object {$_.name -like “SupLCVT*”} | select @{Name=”Server”;Expression={$CurrentServer}}, Status | Format-Table Note that I am utilizing the script found here for multithreading WMI calls and other commands: http://www.get-blog.com/?p=189 $ServerList is composed […]

  • /r/powershell
  • AZURERM Cmdlets and JSON like output

    Can anyone help me parse out these AZURERM commandlets? They aren’t very powershell like, and i don’t know how to treat the output. Here is a snippit of the get-azurerm output. How would i pull individual items from the OSProfile. OSProfile.computername does not work since its in a JSON like format. OSProfile : ComputerName : […]

  • /r/powershell
  • POSH Script to Allow Windows Remote Management and WMI through Windows Firewall on Private Networks

    Does anyone know how to do this in POSH? I dont know where the default path is so I cant use netsh advfirewall … – and Enable-PSremoting does not do what I want it to. For WMI I have this: netsh advfirewall set service RemoteAdmin enable netsh advfirewall firewall add rule dir=in name =”WMI” program=%systemroot%system32svchost.exe […]

  • /r/dotnet
  • Dumb question about SSRS

    My company has a web application written in C# / .net 4.0 and it uses Razor Views and MVC (System.Web.Mvc version 4.0.30319), as well as Crystal Reports. We’re looking to switch over to SQL Server Reporting Services. I’ve started doing some research online, and it looks like accessing the reports through a URL is probably […]