VMware Horizon Community
x2active
Contributor
Contributor

How to VM ViewPowerCLI combination with vSphere PowerCLI

I have problem to combine VM View PowerCLI combination with vSphere PowerCLI for Start Virtual Machine in VM View pool and prevent bootstorm.

For now i have Get-Pool -pool_id XXX | Get-DesktopVM | Start-VM but command end at Get-DesktopVM.

any idea.

Reply
0 Kudos
4 Replies
w1nter
Enthusiast
Enthusiast

Hi,

The View PowerCLI cmdlets can only be run from the connection broker, is this where you are running them? The actual error would help......

Either way, wouldnt a more elegant way be to configure the pool to have a certain number of desktops powered on? Or if you know the naming convention of the destops, just hit them direct from vCenter?

Reply
0 Kudos
x2active
Contributor
Contributor

I use View Cmdlet on View connection broker and install vsphere cmdlet in this machine too

About Computer namne i have to use manual pool for some individual user and individual computer name

Reply
0 Kudos
w1nter
Enthusiast
Enthusiast

can you post the error? or maybe try piping it to get-member to see if the object you are passing can be pipelined to the next cmdlet.

Reply
0 Kudos
shreevmw
Contributor
Contributor

Hope this helps:

1. Install vSphere PowerCli on View Connection Server

2. connect-viserver <IPof vCenter>
3. $vm1 = Get-view -ViewType VirtualMachine -Flter @{"Name" = "VM name as in VC"}
4. $hostview = Get-View -Id $vm1.Runtime.Host
5. $vm1.PowerOnVM($vm1.Runtime.Host)

Reply
0 Kudos