@Alex-Zhao
2018-07-19T13:41:05.000000Z
字数 308
阅读 89
vmware虚拟化
$vmList = get-vmhost <ESXi IP> | get-virtualportgroup -name 'vm network' | get-vm
$vmList
Write-Host "-----------------------------"
foreach ($vm in $vmList) {
$vm
$vm.powerState
$adapter = get-networkadapter -vm $vm
$adapter.networkName
set-networkadapter -networkadapter $adapter -NetworkName 'NH-IBZ-5-vlan16'
}