Get-CimInstance -Classname Win32_NetworkAdapterConfiguration | Where {$_.IPAddress} | select -Property ipaddress
-OR-
Get-CimInstance -Classname Win32_NetworkAdapterConfiguration | select -ExpandProperty ipaddress | Sort-Object
清除结果中的空值
原文:http://www.cnblogs.com/IvanChen/p/4488285.html