Get IP informations on a remote computer with PowerShell


Here one of the many ways of retrieving IP configuration of NIC on a remote machine.
We’ll use “Win32_NetworkAdapterConfiguration” WMI class :

Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter "IPEnabled=$true" -ComputerName SQL

Note : The “-Filter” allow us to retrieve only NIC with IP configured.


With the appropriate properties and several computers :

Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter "IPEnabled=$true" -ComputerName SQL,2K8R2,WSUS,SOFSR2Node1,SOFSR2Node2 | Select-Object __SERVER,Description,DHCPEnabled,DHCPServer,DNSDomainSuffixSearchOrder,DNSServerSearchOrder,IPAddress,DefaultIPGateway,IPSubnet,MACAddress,FullDNSRegistrationEnabled | Format-Table


There’s a lot of columns, so you can replace the “Format-Table” with “Out-GridView” go get a nicer output :



Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.