Powershell Script to check the DNS Server IPs for the windows 2012 servers in AD.

I was asked to get the details in one of our old environment to get the DNS settings for a list of Server 2012 R2 servers in the AD and If the third octet on the primary DNS server setting does not match to the PRD then have to send an email to the operation team.

So I wrote the small script which three below parts to achieve the same.

1. Getting the windows 2012 details from the AD and exporting it to the CSV
2. From the CSV we need to get the DNS settings from the Nic
3. Searching it whether DNS server setting which does not match ‘14’ in third octet then send an email.

Pls download the script from the below link.

Dropbox

 

 

Advertisement
This entry was posted in Powershell, Windows and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s