Jump to content


Photo

Change Power State setting thru powershell

Started by SCOTT GILES , 14 April 2011 - 08:10 PM
3 replies to this topic

Best Answer William Charnell , 15 April 2011 - 02:45 PM

This may just be the console not being able to display the shutdown action - when I try this locally it appears as a blank action in the console rather than 'No action' or 'suspend'.

Note that the earlier response missed off the off-peak disconnect case, and the 'extended disconnect' case is probably not that relevant to you if you have set up the disconnect case to shut down. Also, you can set the cases you want in one go rather than using multiple separate cmdlet calls, so:

Set-BrokerDesktopGroup Win7 -PeakDisconnectAction 'shutdown' -OffPeakDisconnectAction 'shutdown'

and you can confirm that they're set by reading the properties of the group back:

Get-BrokerDesktopGroup Win7 | Format-List 'Name','*PeakDisconnect*'

Regards
William

SCOTT GILES Members

SCOTT GILES
  • 34 posts

Posted 14 April 2011 - 08:10 PM

I want to change the Power State settings to shut down, rather than suspend desktops after the disconnected timer has expired. I have read that I need to use the SDK thru powershell to complete this. Any ideas?



Nicholas Ceballos Citrix Employees

Nicholas Ceballos
  • 36 posts

Posted 15 April 2011 - 03:28 AM

Scott,

You could use the following commands.

asnp Citrix.*
Set-BrokerDesktopGroup yourdesktopgroupname -OffPeakExtendedDisconnectAction Shutdown
Set-BrokerDesktopGroup yourdesktopgroupname -PeakDisconnectAction Shutdown
Set-BrokerDesktopGroup yourdesktopgroupname -PeakExtendedDisconnectAction Shutdown

Also, here is a breakdown of other powershell commands:
http://support.citri...ticle/ctx127254

Thank you

Nick



SCOTT GILES Members

SCOTT GILES
  • 34 posts

Posted 15 April 2011 - 02:16 PM

Ran following

Windows PowerShell
Copyright © 2009 Microsoft Corporation. All rights reserved.

PS K:\> Asnp Citrix.*
PS K:\> Set-BrokerDesktopGroup Win7 -OffPeakExtendedDisconnectAction Shutdown
PS K:\> Set-BrokerDesktopGroup Win7 -PeakDisconnectAction Shutdown
PS K:\> Set-BrokerDesktopGroup Win7 -PeakExtendedDisconnectAction Shutdown
PS K:\>

Reopen Studio actions are still NO action or Suspend



William Charnell Citrix Employees

William Charnell
  • 256 posts

Posted 15 April 2011 - 02:45 PM

This may just be the console not being able to display the shutdown action - when I try this locally it appears as a blank action in the console rather than 'No action' or 'suspend'.

Note that the earlier response missed off the off-peak disconnect case, and the 'extended disconnect' case is probably not that relevant to you if you have set up the disconnect case to shut down. Also, you can set the cases you want in one go rather than using multiple separate cmdlet calls, so:

Set-BrokerDesktopGroup Win7 -PeakDisconnectAction 'shutdown' -OffPeakDisconnectAction 'shutdown'

and you can confirm that they're set by reading the properties of the group back:

Get-BrokerDesktopGroup Win7 | Format-List 'Name','*PeakDisconnect*'

Regards
William


Best Answer