Additional PowerShell Functions for DNS Reporting and Consolidation

This PowerShell DNS function library includes functions to help with DNS server configuration reporting , DNS zone configuration reporting, and consolidation of DNS zones (especially reverse DNS zone roll up).

DNSFunctions.zip
 
 
 
 
 
5 Star
(6)
5,561 times
Add to favorites
Active Directory
7/31/2014
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • How to use the script?
    1 Posts | Last post January 07, 2020
    • After executing the .\DNSFunctions.ps1 from Powershell to load the function into memory, I am attempting to use the following function Copy-DNSServerZone but getting this error:
      
      copy-dnszonereverse : The term 'copy-dnszonereverse' is not recognized as the name of a cmdlet, function, script file,
      or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and
      try again.
      At line:1 char:1
      + copy-dnszonereverse
      + ~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : ObjectNotFound: (copy-dnszonereverse:String) [], CommandNotFoundException
          + FullyQualifiedErrorId : CommandNotFoundException
      
      
      Am I doing something wrong?
      
      Thanks for your help
  • issue copying registers
    2 Posts | Last post August 02, 2019
    • Hello,
      First, Thanks for your work!! 
      
      I'm checking first in my test environment before go to production and I tried to copy some registers with from Reverse lookup zone in a subrange to the global range, an the problem is that it copied 192.168.0..6 instead of 192.168.30.6 As you can see with 2 dots and it forgot 30 . And now, I can't remove this wrong registers. Do you know about this issue?? 
      This was the command
      Copy-DNSServerZone -srcserver srv1.juanpelab.local -srczone "30.168.192.in-addr.arpa" -Destserver srv1.juanpelab.local -Destzone "0.168.192.in-addr.arpa" -StaleDays 21
      
      
      Thanks.
      Juan Pedro
    • Forgot it!!!, I had a mistake with the destination zone, it is wrong, it should be "168.192.in-addr.arpa"  
      
      Thanks, it is working perfectly!!!
  • Different need
    2 Posts | Last post August 31, 2016
    • How to just report on all servers in active directory running DNS Server, #1 to audit to make sure someone hasnt installed DNS Server service, #2 to report on the name to make sure a co-worker hasnt promoted a server without my knowledge lol. Is there not a one liner for this? We are 2008r2\2012 DC farm right now at a 2008r2 level AD integrated DNS.
    • Hi Jeremy,
      You can use Get-ADComputer to get a list of all computers in the domain filtered where the OS is like *server*. Pipe that list into a ForEach-Object that does a Get-CimInstance or Get-Service -ComputerName to query for the presence of the DNS service.
      This would identify rogue servers in the environment running DNS, not just DCs.
      Hope this helps.
      Ashley
      GoateePFE
      
  • ACL Preservation
    2 Posts | Last post May 19, 2015
    • Does this script preserve the ACLs on copied records?
    • Hi Zach,
      This code does not account for zone security on “Secure Only” update zones.  Usually reverse zones allow non-secure updates, so this is likely not a factor for you. However, when adding records the function uses the –AllowUpdateAny switch just to be safe.
      Ashley