Disable Power Management for a Desktop Group

I was doing some testing with various settings and catalogs in XD 5.6.  After assigning myself a machine for my testing, I would notice it would shut down after I logged off.  Since I was using this desktop on a fairly regular basis, I didn’t want to have it shut down, then have to wait for it to power back up before using it again.  But how do I disable the power management for just that group?

With assigned machines, XD wants to have all the machines available for peak hours.  During off peak hours however, machines without logged in users will be turned off.  Most of my testing was being done during off peak hours, so as soon as I logged off, the machine was shut down.  Unless I tried to connect again during peak hours, my desktop was turned off and I would have to wait for it to power on before I could connect.   Of course I could extend the time of peak hours in the power settings of the Desktop Group, but I wanted to disable the setting completely.  In other words, I didn’t want any power management at all for the group.

A little digging in PowerShell was helpful.  Running the ‘Get-BrokerDesktopGroup’ command returns several variables, one of which is ‘AutomaticPowerOnForAssigned’ object.  Setting that object to False fixed the issue.

  • Set-BrokerDesktopGroup “groupname” -AutomaticPowerOnForAssigned $False

By the way, XenDesktop includes several powershell commands.  All the required snapins may not be loaded even though they are installed on the server.  You can see which snapins are loaded or ‘registered’ on the server by running the ‘Get-Pssnapin -Registered’ command.  My server returns the following:

  • Name        : Citrix.ADIdentity.Admin.V1
    PSVersion   : 2.0
    Description : Manages Active Directory Computer Accounts

    Name        : Citrix.Broker.Admin.V1
    PSVersion   : 2.0
    Description : This PowerShell snap-in contains cmdlets used to manage the Citrix Broker.

    Name        : Citrix.Common.Commands
    PSVersion   : 2.0
    Description : Citrix Common Commands

    Name        : Citrix.Common.GroupPolicy
    PSVersion   : 2.0
    Description : Citrix Group Policy Provider

    Name        : Citrix.Configuration.Admin.V1
    PSVersion   : 2.0
    Description : Stores Service configuration information

    Name        : Citrix.Host.Admin.V1
    PSVersion   : 2.0
    Description : Manages Hosts, and Hypervisor Connections

    Name        : Citrix.LicensingConfig.Admin.V1
    PSVersion   : 2.0
    Description : Licensing Config PowerShell SnapIn

    Name        : Citrix.MachineCreation.Admin.V1
    PSVersion   : 2.0
    Description : Creates new Virtual Machines

    Name        : Citrix.MachineIdentity.Admin.V1
    PSVersion   : 2.0
    Description : Manages Virtual Machine Storage

    Name        : PvsPsSnapIn
    PSVersion   : 2.0
    Description : This is a PowerShell snap-in that includes cmdlets.

You will most likely have to load these snapins before running the ‘Get-BrokerDesktopGroup‘ command above.  Running ‘Get-Pssnapin -Registered | Add-Pssnapin‘ should get the required snapins loaded.




One response to “Disable Power Management for a Desktop Group

  1. For a shortcut when adding your snapins you can use the command: Asnp Citrix.* then hit enter and it will add all of the Citrix snapins.