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 […]

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 {$ -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: $ServerList is composed […]

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 […]

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 […]