桌面场景切换用到:
$vc = ‘192.168.0.8‘ #VCenter IP
Connect-VIServer -Server $vc -username "administrator@vsphere.local" -Password "1qaz!QAZ"
$VMs = Get-ResourcePool 上课6-3 | Get-VM "win7-shangk*"
foreach( $vm in $VMs ) { Shutdown-VMGuest $vm -Confirm:$false}
本文出自 “vitrual Word” 博客,请务必保留此出处http://wangxiaokang.blog.51cto.com/6646856/1840968
原文地址:http://wangxiaokang.blog.51cto.com/6646856/1840968