Modify DNS servers on ESXi hosts
From VVCWiki
Jump to navigationJump to search
$hosts = get-vmhost
foreach ($server in $hosts )
{
Write-Host $server
$currentnet = Get-VMHostNetwork -VMHost $server
Set-VMHostNetwork -Network $currentnet -DnsAddress 10.70.32.3,10.70.10.3 -Confirm:$false
}