Monday, March 2, 2015

Setting the a VMware Horizon View Pool's "Remote Machine Power Policy" configuration via PowerCLI

I’m sure most would agree with me when I say that the performance of the VMware View GUI management console can be extremely frustrating at times. What I’ve tried my best to do over the past few years of working with VMware VDI environments is to use PowerCLI cmdlets as much as possible when performing routine tasks such as recompose operations.  One of the other operations I seem to perform quite a bit recently is configuring the Remote Machine Power Policy during maintenance windows and the 5+ clicks sometimes feel like an eternity so this blog post will serve as one that I can reference to in the future to save myself from going through the GUI.

The Remote Machine Power Policy can be found under the Desktop Pool… tab as shown here:


Using the Get-Pool cmdlet will display the full details of each pool and the attribute representing the Remote Machine Power Policy is powerPolicy:


The following cmdlet can be used to display only the Pool ID and Remote Machine Power Policy:

Get-Pool | fl Pool_ID,powerPolicy


As the pools above are all Automatic Linked Clone Pools, the cmdlet we’ll be using to set the Remote Machine Power Policy will be:


Details of this cmdlet can be found at the following URL:

The options we have for configuring the Remote Machine Power Policy are as follows:

  1. AlwaysOn
  2. RemainOn
  3. Suspend
  4. PowerOff

So to configure the pool to be always turned on, we would execute the following cmdlet:

Update-AutomaticLinkedClonePool -Pool_id <desktopPoolID> -powerPolicy AlwaysOn

What’s unfortunately is that the following cmdlet does NOT allow me to set all the pools to a specific policy even in VMware Horizon View 6:

Get-Pool | Update-AutomaticLinkedClonePool -powerPolicy AlwaysOn

No comments: