Share this post:This blog post is part of an ongoing series by Adam Gordon. Adam will show you how to use each PowerShell command each week. This week, Adam covers Clear-DnsServerStatistics.
When to use Clear-DnsServerStatistics?
The Clear-DnsServerStatistics cmdlet clears all Domain Name System (DNS) server statistics. You cannot retrieve the statistics after you have cleared them.
The cmdlet clears statistics only for the zones you have specified if the ZoneName parameter is set. The cmdlet clears aggregated statistics at the server level if you don’t specify the ZoneName parameter.
What version of PowerShell should I use for this blog?
Get the PowerShell Version for your machine
$PSVersionTable
This command displays the PowerShell version information for 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 the DNS server for the ITP.LOCAL zone.
Learn last week’s command: Clear-DNSServerCache.
Do you need PowerShell training? ITProTV offers PowerShell online IT training courses.