VMware Cloud Community
Guv
Enthusiast
Enthusiast
Jump to solution

Power on and off VM

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

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

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

View solution in original post

0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

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

0 Kudos
Guv
Enthusiast
Enthusiast
Jump to solution

Thanks

0 Kudos