PowerShell Magazine Brain Teaser Winner!

I received notification yesterday from PowerShell Magazine that I had won last weeks PowerShell Brain Teaser to Assign a list of processes to a variable and output it to the console.

Your new task is to get a list of running processes, assign it to a variable and output the result to the console window. Use the minimal number of characters. Be aware, a space is a character too. The shortest solution wins.


Something cool that I stumbled on while working on this weeks break teaser is being able to use PowerShell to view the local and remote endpoints for active TCP connections:

1[Net.NetworkInformation.IPGlobalProperties]::GetIPGlobalProperties().GetActiveTcpConnections() | Format-Table -AutoSize


Had I not been trying to figure a way out to retrieve the IP address information within the guidelines specified in this weeks brain teaser, I never would have known this was possible.