User Get-ADComputer and the -Filter parameter. Look for the condition below. Then get the DNS A record using the name of the computer from the AD.
"operatingsystem -like '*server*'"
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi all,
Is there a way to get DNS dynamic A records for only servers with Windows AD integrated Zone, not including workstations?
Thank you!
Answer accepted by question author
User Get-ADComputer and the -Filter parameter. Look for the condition below. Then get the DNS A record using the name of the computer from the AD.
"operatingsystem -like '*server*'"
The safest way is to not to mingle IP address ranges of static and DHCP created records. Then you only need to check the IP address to know if it's been created/updated by DHCP.
I think a problem you may have is if you've allowed the machines with statically assigned IP addresses to register themselves or update their resource records in DNS. I believe that may add a timestamp value to the resource record. But if that isn't happening then the presence of a timestamp value (or one with a date of 1/1/1601) should identify a "static" record.