Scripting

IP Information Powershell script

If you want an easy Powershell script to recieve IP Information for some workstations then this nice and simple powershell script should work nicely. It takes input from a file containing a list of the hosts and displays it in a nice output format

$ComputerName = @{l="ComputerName";e={$_.__Server}}

get-wmiobject -query "Select * FROM Win32_NetworkAdapterConfiguration WHERE IpEnabled=’TRUE’" -computer (get-content C:\Clientlist1.txt) |  ft $ComputerName,MacAddress,IPAddress,DNSServerSearchOrder,WINSPrimaryServer –auto

Leave a Reply

Your email address will not be published. Required fields are marked *