PowerShell
Edit|Remove
<#===================================================================================================================  
Script Name    : DNSConfig.ps1  
       Purpose    : To fetch the DNS client settings report from remote machines   
Author        : Pradeep Raju - 8015648323  
Date Created    : 10/5/2017  
  
=====================================================================================================================#> 
$servers=get-content D:\serverlist.txt 
$from=read-host "Enter Sender Email ID" 
$sendto = Read-host "Enter Recepient Email ID" 
$smtp="Enter SMTP server address" 
foreach($server in $servers) 
{ 
$result1=(Get-DnsClientServerAddress  | select-object Serveraddresses).Serveraddresses 
   
Add-content C:\temp\dnsclientsettings.txt "$server,$result1" 
 
} 
send-mailmessage -from $from -to $sendto -Subject "DNS Client settings Report" -smtp $smtp -body "Please find the attached  
 
report for administrative purpose" -attachment "C:\temp\dnsclientsettings.txt"
 Script is used to fetch the DNS client settings configured on remote machines. Output file will be emailed to user. User has to provide server names on which query to be run, sender & recepient email address,smtp server address as input during script execution.Please test the script and let me know in case of any fine tuning is required