Taking on PowerShell one cmdlet at a time

Share this post: This is part of an ongoing blog series by Adam Gordon. Adam will show you how to use each PowerShell command each week. Adam will be covering Get-DnsServer this week.

When should you use Get-DnsServer
The Get-DnsServer cmdlet retrieves the DNS server configuration. The DNS server must run Windows Server 2008 R2 or higher.
The pipeline operator allows you to pass the output from the Get-DnsServer cmdlet onto the Export-Clixml kmdlet. This cmdlet creates an XML file with the configuration. The XML file can be used to backup or transfer DNS settings between computers.
What version of PowerShell should I use for this blog?
Get the PowerShell Version for your machine
This command displays the PowerShell version information for your machine.

How to use Get DNSServer
Configure a DNS server:
Get-DnsServer -ComputerName “”
This command configures a DNS server.

Export your local DNS server configuration.
Get-DnsServer | Export-Clixml -Path “c:\config\DnsServerConfig.xml”
This command retrieves the DNS server configuration from the local server and passes it on to the Export-Clixml cmdlet for translation into an XML.

Learn the command for last week: Get-GPOReport
Do you need PowerShell training? ITProTV offers PowerShell online IT training courses.