fborges555
Enthusiast
Enthusiast

power machines on esxi using powercli

Jump to solution

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

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership

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

0 Kudos
6 Replies

Yes it is possible.

Use Connect-VIServer commandlet to connect to the host.

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

0 Kudos
LucD
Leadership
Leadership

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

0 Kudos
fborges555
Enthusiast
Enthusiast

L.

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

Thanks

0 Kudos

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

0 Kudos
LucD
Leadership
Leadership

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


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

0 Kudos
fborges555
Enthusiast
Enthusiast

misunderstood.

thanks

Tags (1)
0 Kudos