Posts

Showing posts from December, 2014

Powershell for IP information of remote machines

First off, I must appologise, this Power shell script is not my own.  Worst, I cannot remember where I got the script from.  I will endeavour to credit the author as soon as I find them. With that in mind...Some time ago I needed to find out what the DNS settings on our servers were, and as they are manually configured i.e. no DHCP this would mean jumping on each box (200+) and taking a peak.  This screamed Power Shell at me! This little script will run off and return to you the IP configuration of any server you can access.  It does a nice little check to see if the server is on first before trying to get the IP information. I added the write out to a file bit but the original just had the output sent to the console. Here's the code. [cmdletbinding()] param (     [parameter(ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)]     [string[]]$ComputerName = $env:computername )             begin {} process {     foreach ($Computer in $ComputerNa