VMware Cloud Community
fborges555
Enthusiast
Enthusiast
Jump to solution

power machines on esxi using powercli

hi gurus

I would like to know if it is possible to turn on VM on an ESXi host using powercli, so instead of going into the ESXi host using ssh and running the power on command but rather doing from powercli, this is to turn on multiple VMs.

Thanks a bunch

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Connect to the the vSphere server (ESXi node or VCSA).

Connect-VIServer -Name <vSphere-server> -Credential (Get-Credential)

Then get the VM and start it

$vmName = 'MyVM'

Get-VM -Name $vmName | Start-VM -COnfirm:$false


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

Reply
0 Kudos
6 Replies
StephenMoll
Expert
Expert
Jump to solution

Yes it is possible.

Use Connect-VIServer commandlet to connect to the host.

Then Start-VM commandlet to start your chosen VM(s).

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Connect to the the vSphere server (ESXi node or VCSA).

Connect-VIServer -Name <vSphere-server> -Credential (Get-Credential)

Then get the VM and start it

$vmName = 'MyVM'

Get-VM -Name $vmName | Start-VM -COnfirm:$false


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
fborges555
Enthusiast
Enthusiast
Jump to solution

L.

Thanks for jumping in, can I connect to the ESXi host and perform the same task ?

Thanks

Reply
0 Kudos
StephenMoll
Expert
Expert
Jump to solution

You connect to vCenter or ESXi servers using Connect-VIServer in the same way.

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Like I said earlier, any vSphere Server, be it ESXi or vCenter.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
fborges555
Enthusiast
Enthusiast
Jump to solution

misunderstood.

thanks

Tags (1)
Reply
0 Kudos