Change DNS IP Address in remote Windows Server
Open PowerShell as Administrator and run the following commands:
Invoke-Command -ComputerName "server1.bnv.com" -ScriptBlock {
$NetworkInterface = Get-NetAdapter -Name "Eathernet0"
$DNSServers = "10.10.10.10", "10.10.10.11"
$NetworkInterface |Set-DnsClientServerAddress -ServerAddress $DNSServers
}
Note: Replace $DNSServers IP with your DNS IP.
$NetworkInterface = Get-NetAdapter -Name "Eathernet0"
$DNSServers = "10.10.10.10", "10.10.10.11"
$NetworkInterface |Set-DnsClientServerAddress -ServerAddress $DNSServers
}
Note: Replace $DNSServers IP with your DNS IP.
Comments
Post a Comment