Hello,
Does anyone know how to specify a time delay between issuing reboots of virtual machines in a folder? I can send the restart command but don't know how to tell the script to wait 4 seconds before issuing a restart to the next virtual machine in line. I just know the -RunAsync command. Any help would be greatly appreciated.
$vmdesktops = Get-folder -Name "test" |get-vm
Restart-VM $vmdesktops -Confirm:$false -RunAsync