VMware Cloud Community
Mneighthyn
Contributor
Contributor

PowerCLI beginner - Script for automated desktop pool refresh/recompose?

Hello,

Due to datastore limitations I regularly turn on refresh for specific floating linked-clone pools and recompose.  My manager asked if I could automate that...  I, technically, have a computer programming background but haven't really touched programming in years (read: 20 years) so, I began looking into PowerCLI and options for completing the requested task.  I feel I'm slightly over my head as there doesn't appear to be many introduction guides for PowerCLI and getting a simple connection to one of our Connection Servers appears to work but once I try get-vm or any other very basic command, I get an error stating I'm not connected to any server.  Ultimately, I just want to automate the refresh of a couple desktop pools and set recompose for every other Friday.  Any help/suggestions would be greatly appreciated.

Thanks,

0 Kudos
2 Replies
LucD
Leadership
Leadership

Have you seen Re: Recompose Horizon Desktop Pools via PowerCLI ?

If you want to use Get-VM you also have to connect to the vSphere server (with Connect-VIServer).


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

0 Kudos
Mneighthyn
Contributor
Contributor

There was a certificate related warning that I figured out how to get past and I was connecting to the wrong server (connecting to the connection server by itself did nothing... needed to connect to the view server.) but now the commands seem to be working.  Hopefully I can figure it out from here.  Thanks, @LucD

0 Kudos