标签:io ar for sp on cti ad bs server
$dnss=gwmi win32_networkadapter -filter "NetConnectionStatus = 2"|foreach {(gwmi Win32_NetworkAdapterConfiguration -filter "index = $($_.index)").DNSServerSearchOrder}
foreach ($dns in $dnss)
{
$dns
$ns = cmd /c "nslookup www.baidu.com $dns"
if ($ns.contains("DNS request timed out."))
{"error"}
}
标签:io ar for sp on cti ad bs server
原文地址:http://www.cnblogs.com/dreamer-fish/p/4032110.html