Get DNS Settings From Remote Servers
Awhile back I needed to verify that the DNS settings were correct on 37 servers. Thats a job for Powershell.
by Joe Waldin
linux dns server
Awhile back I needed to verify that the DNS settings were correct on 37 servers. Thats a job for Powershell.
by Joe Waldin
linux dns server
Comments are closed.
I dont see any scripts
Hello, I couldn't get anything…. why ???
not helpful , moreover some moment was lost on this video
But very grateful to you Sir. Just incase someone wants to copy, I'll save you the trouble:
===
CLS
$Servers = Import-Csv -Path "D:PowershellServerList.csv"
foreach($Server in $Servers)
{
if($Servers.Selected -eq "x")
{
Write-Host " "
Write-Host $Server.Name
$Networks = Get-WmiObject Win32_NetworkAdapterConfiguration -Computer $Server.Name | ? {$_.IPEnabled}
foreach ($Network in $Networks)
{
Write-Host " DNS:" $Netowrk.DNSServerSearchOrder
Write-Host " IP:" $Network.IpAddress[0]
Write-Host " Subnet:" $Network.Subnet[0]
Write-Host " Gateway:" $Network.DefaultIPGateway
Write-Host " DHCP Enabled:" $network.DHCPEnabled
Write-Host ""
}
}
}
===
The NIC command was never explained…. that would have been great instead of just going over that