Clear-DnsServerStatistics | Taking on PowerShell one cmdlet at a time | Weekly Blog

Share this post:

This is a part of an on-going blog series written by Adam Gordon. Each week, Adam will walk you through a PowerShell command, showing you when and how to use each one. This week, Adam covers Clear-DnsServerStatistics.

When to use Clear-DnsServerStatistics?

The Clear-DnsServerStatistics cmdlet clears all Domain Name System (DNS) server statistics. After you have cleared the statistics, you cannot retrieve them.

If you specify the ZoneName parameter, the cmdlet clears statistics for the specified zones. If you do not specify the ZoneName parameter, the cmdlet clears aggregated server level statistics.

What version of PowerShell am I using for this blog?

Get the PowerShell Version from your machine:

$PSVersionTable

This command shows you the PowerShell version information on your machine.

How to use Clear-DnsServerStatistics?

Clear DNS server statistics:

Clear-DnsServerStatistics

This command clears statistics from a DNS server.

Clear DNS server statistics:

Clear-DnsServerStatistics -ZoneName “ITP.LOCAL”

This command clears statistics from a DNS server for the zone named ITP.LOCAL.

Need PowerShell training? Check out ITProTV’s PowerShell online IT training courses.

Leave a Reply

Your email address will not be published. Required fields are marked *