Идентификация подсоединенных сетевых адаптеров
$computer="localhost"
$connected=2
Get-WmiObject -Class win32_networkadapter -computername $computer `
-filter "netconnectionstatus = $connected" |
foreach-object `
{
Get-WmiObject -Class win32_networkadapterconfiguration `
-computername $computer -filter "Index = $($_.deviceID)"
}
Голосов пока нет

Оставить комментарий