Monday, June 17, 2013

Powershell 3.0 CIM snippet : Properties of IPEnabled Adapters

$count = ((Get-CimInstance -class Win32_NetworkAdapterConfiguration).count - 1)

$Adapters = 0..$count | % {(Get-CimInstance -class Win32_NetworkAdapterConfiguration)[$PSItem]}
$Adapters
$IPEnabled=($Adapters | ? {$_.IPEnabled -eq "True"})
$IPEnabled | fl *

No comments: