Pages

Wednesday, February 22, 2012

Notes on Citrix XenDesktop PowerShell cmdlets

As with one of my previous posts:

Notes on Citrix XenApp 6.5 PowerShell cmdlets
http://terenceluk.blogspot.com/2012/02/notes-on-citrix-xenapp-65-powershell.html

… I’ve been trying to keep track of the cmdlets I’ve been using to make my life a bit easier while configuring XenApp and XenDesktop farms and since I have cmdlets scattered around in different notes, I thought it would be a good idea to consolidate them into a blog post that I can reference to again in the future.

Listing XenDesktop Information

List all desktop catalogs and their information:
Get-BrokerDesktopGroup

List all desktop catalogs and their information and pipe to file:
Get-BrokerDesktopGroup > C:\XenDesktopCatalogs.txt

List a specific desktop catalog based on Name variable:
Get-BrokerDesktopGroup -Name “Windows 7”

List only the name of applications based on Name with a wild card:
Get-BrokerDesktopGroup -Name Windows*7* | format-list name

… and if you want to use other variables, you can review the attributes available via the

Get-BrokerDesktopGroup

… which outputs information similar to the following:

image

List only the name and PeakBufferSizePercent of applications based on Name with a wild card:
Get-BrokerDesktopGroup -Name Windows*7* | format-list name,PeakBufferSizePercent

List the desktops in the desktop catalog named “Windows 7 64-bit Internal Static” that is currently using an old snapshot after an update image was pushed out:
Get-BrokerDesktop -DesktopGroupName "Windows 7 64-bit Internal Static" | format-list MachineName,ImageOutOfDate 

Modify XenDesktop Desktop Catalogs and Desktop Groups

Set the PeakBufferSizePercent value of a desktop catalog named “Windows 7 64-bit External Random to 100%:
Set-BrokerDesktopGroup "Windows 7 64-bit External Random" -PeakBufferSizePercent 100

Set the PeakBufferSizePercent value of all desktop catalogs to 90 percent:
Get-BrokerDesktopGroup | Set-BrokerDesktopGroup -PeakBufferSizePercent 90

Set the PeakBufferSizePercent value of all desktop catalogs that begin with “Windows” + <anything in between> + 7 + <anything after> to 80 percent:
Get-BrokerDesktopGroup -Name Windows*7* | Set-BrokerDesktopGroup -PeakBufferSizePercent 80

I’ll append to this post as I find more in my notes.

1 comment:

Eric said...

Hi, is there a way to configure single XenDesktops or groups by Powershell, like increasing CPU, memory or disk space?
That would be nice to know. Thanks!