桌面场景切换用到:
$vc = ‘192.168.0.8‘ #VCenter IP
Connect-VIServer -Server $vc -username "[email protected]" -Password "1qaz!QAZ"
$VMs = Get-ResourcePool 上课6-3 | Get-VM "win7-shangk*"
foreach( $vm in $VMs ) { Shutdown-VMGuest $vm -Confirm:$false}
时间: 2024-11-09 03:10:13