PowerShell for Windows Admins

Sep 26 2010   12:59PM GMT

WMI and Network Adapters: 5

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

Does a machine have problems communicating on the network? Then one troubleshooting step is to check the DNS servers it is using

Get-WmiObject -Class Win32_NetworkAdapterConfiguration -ComputerName "." |
where {$_.DNSServerSearchOrder} |
select Description, IPAddress, DNSServerSearchOrder

Get the instances of the NetworkAdapterConfiguration class for the computer and filter out those that don’t have a DNSServerSearchOrder set.  Display the results.

If you get nothing back then no NICs have DNS settings

 Comment on this Post

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: