Enable dns scavenging at the server level using PowerShell

ritmo2k 811 Reputation points
2021-09-26T16:03:17.613+00:00

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?

Thanks.

Windows for business | Windows Client for IT Pros | Directory services | Active Directory
Windows for business | Windows Client for IT Pros | Networking | Network connectivity and file sharing
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 39,921 Reputation points
    2021-09-27T10:50:10.937+00:00

    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.

    https://learn.microsoft.com/en-us/powershell/module/dnsserver/set-dnsserverscavenging?view=windowsserver2019-ps

    -----------------------------------------------------------------------------------------------------------------------

    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 811 Reputation points
    2021-09-27T11:36:45.473+00:00

    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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.