I am writing some scripts to power off a VM and to power on VM's. Can someone please tell me what commands i use to power on a VM and to power off a VM, if that is possible.
Thanks
Depends if you have VMware tools running.
1) WIthout tools
Get-VM <yourVM> | Stop-VM
2) With tools
Get-VM <yourVM> | Shutdown-VMGuest
The 2nd method lets the OS do the shutdown.
The first method is cutting the power.
For the power on you can use
Get-VM <yourVM> | Start-VM
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Depends if you have VMware tools running.
1) WIthout tools
Get-VM <yourVM> | Stop-VM
2) With tools
Get-VM <yourVM> | Shutdown-VMGuest
The 2nd method lets the OS do the shutdown.
The first method is cutting the power.
For the power on you can use
Get-VM <yourVM> | Start-VM
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks