[关闭]
@Alex-Zhao 2018-07-19T13:41:05.000000Z 字数 308 阅读 89

PowerCLI修改虚拟机的网络标签

vmware虚拟化


  1. $vmList = get-vmhost <ESXi IP> | get-virtualportgroup -name 'vm network' | get-vm
  2. $vmList
  3. Write-Host "-----------------------------"
  4. foreach ($vm in $vmList) {
  5. $vm
  6. $vm.powerState
  7. $adapter = get-networkadapter -vm $vm
  8. $adapter.networkName
  9. set-networkadapter -networkadapter $adapter -NetworkName 'NH-IBZ-5-vlan16'
  10. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注