Connect-VIserver -Server vcenter1.vmware.local -User "administrator@vsphere.local" -Password "VMware1!"
$esxiHost = "esxi-1.vmware.local"
$vmnic = "vmnic1"
$host1 = Get-VMHost -Name $esxiHost
$esxcli = Get-EsxCli -VMHost $host1 -V2
while ($true) {
$esxcli.network.nic.down.Invoke(@{nicname=$vmnic})
Start-Sleep -Seconds 30
$esxcli.network.nic.up.Invoke(@{nicname=$vmnic})
Start-Sleep -Seconds 30
} 

By Kader

Leave a Reply

Your email address will not be published. Required fields are marked *