Monday, January 19, 2009

gets IP addresses, DHCP, DNS, routing

[] to get all IP addresses in use on the local computer

PS> Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter IPEnabled=TRUE -ComputerName . | Format-Table -Property IPAddress

[] to display detailed IP configuration data for each network adapter

PS> Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter IPEnabled=TRUE -ComputerName .

[] to display detailed information about DHCP, DNS, routing

PS> Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter IPEnabled=TRUE -ComputerName . | Select-Object -Property [a-z]* -ExcludeProperty IPX*,WINS*

No comments:

Post a Comment