Hi,
I need help to add to my script the option that will check if my VM machine is on and if it is off it will turn it on.
Regards,
Michel
Hi,
if ($VM.PowerState -eq "PoweredOff") { $VM | Start-VM }
You can also do that without the If.
Get-VM MyVM | Start-VM -ErrorAction SilentlyContinue
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thank you.
It works great.
Michel