Modify DNS servers on ESXi hosts

From VVCWiki
Revision as of 15:49, 29 November 2013 by Vvc (talk | contribs) (Created page with " <source lang="powershell"> $hosts = get-vmhost foreach ($server in $hosts ) { Write-Host $server $currentnet = Get-VMHostNetwork -VMHost $server Set-VMHostNetwork -Netw...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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
}