Since you are new, it’s vital that you ramp up first before going down this path and unnecessarily frustrating yourself. There is plenty of no cost video training via:
# Set the admin credential
$Creds = Get-Credential -Credential 'domain\username'
# Get ADDS computers properties for DNS information
'server01','server02','server03' |
ForEach {
"Processing computername $_"
Invoke-Command -ComputerName $_ -ScriptBlock {
# Get the DNS address information for the target
Get-DnsClientServerAddress
} -Credential $Creds
"`n" # line break
}
I am using a typed list here, but this could have been called from a file or even live from ADDS.
You can drive deeper by using the network card config on the host as well. See this…