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“. The prize for winning that particular brain teaser was an eBook version of the recently released “Learn Windows PowerShell 3 in a Month of Lunches, Second Edition” book written by Don Jones and Jeffery Hicks:
This weeks brain teaser is “Find a list of all IP addresses assigned to the local system“. An eBook version of the “Microsoft Windows PowerShell 3.0 First Look” book written by Adam Driscoll is being given away to this weeks brain teaser winner:
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:
[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 so it’s not about winning or losing, it’s about learning by participating.