Display network information using Powershell
This example will display various snippets of network related information using Powershell
Cls
$strComputer = “.”
$colItems = get-wmiobject -class “Win32_NetworkAdapterConfiguration” `
-computername $strComputer | Where{$_.IpEnabled -Match “True”}
foreach ($objItem in $colItems)
{
write-host “MAC Address : ” $objItem.MACAddress
write-host “IPAddress : ” $objItem.IPAddress
write-host “DNS Servers : ” $objItem.DNSServerSearchOrder
Write-host “”
}
Bookmark It
Hide Sites
[ Back to top ]



























