Enable dns scavenging at the server level using PowerShell

ritmo2k 706 Reputation points

After running Set-DnsServerScavenging with and without -ApplyOnAllZones, it appears that only the behavior of new zones created after running the command (or all existing zones if -ApplyOnAllZones is supplied) changes.

The DNS mmc console still indicates that automatic scavenging of stale records is not enabled for the specific server.

How do you enable scavenging at the server level for a specific server using PowerShell?


Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,224 questions
Windows DHCP
Windows DHCP
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.DHCP: Dynamic Host Configuration Protocol (DHCP). A communications protocol that lets network administrators manage centrally and automate the assignment of Internet Protocol (IP) addresses in an organization's network.
1,035 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 39,501 Reputation points

    Hello @ritmo2k ,

    The Set-DnsServerScavenging cmdlet changes scavenging settings on a Domain Name System (DNS) server. If any of the set operations fail, the cmdlet continues to configure other settings.

    The cmdlet displays the settings that it changed and the settings that it did not change.

    Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.

    The cmdlet immediately returns an object that represents the job and then displays the command prompt. You can continue to work in the session while the job completes. To manage the job, use the *-Job cmdlets. To get the job results, use the Receive-Job cmdlet.



    Hope this answers all your queries, if not please do repost back.
    If an Answer is helpful, please click "Accept Answer" and upvote it : )

    0 comments No comments

  2. ritmo2k 706 Reputation points

    I have already read the documentation that you copy and pasted in your response.

    However, the question remains as to why it is not working.

    0 comments No comments