April 11th, 2014

PowerTip: Use PowerShell to Get DNS Settings

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to retrieve local DNS server addresses.

Hey, Scripting Guy! Question With IPconfig, I used to pipe output to the FIND command to filter only DNS information.
          Is there a better way to do this in Windows Server 2012 R2?

Hey, Scripting Guy! Answer Use the Get-DnsClientServerAddress cmdlet:

Get-DnsClientServerAddress | Select-Object –ExpandProperty ServerAddresses

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.