605D: Configure, manage and monitor your
desktop virtualization environment using
PowerShell
Hands-on lab exercise guide
May 2012
Page 1
Table of Contents
Table of Contents .............................................................................................................................................. 2
Overview............................................................................................................................................................. 3
How to log into the lab environment ...................................................... Error! Bookmark not defined.
Exercise 1: Fundamentals – Setting up the Citrix PowerShell environment ............................................ 4
Exercise 2: Setting session policies ............................................................................................................... 16
Exercise 3: Creating an application ............................................................................................................... 21
Exercise 4: Exporting and importing configurations ................................................................................. 24
Exercise 5: Copying and setting application properties ............................................................................. 27
Exercise 6: Deploying XenDesktop Machines ........................................................................................... 35
Exercise 7: Assigning XenDesktop users and administrators .................................................................. 40
Exercise 8: Customizing a XenDesktop group icon. ................................................................................. 47
Page 2
Overview
Hands-on Training Module
This training module has the following details:
Objective

Provide hands-on experience with common task in the Citrix
PowerShell SDK.
Audience

Primary: Citrix Partners, XenApp and XenDesktop Administrators
Lab Environment Details
This section is used to describe the lab environment and the virtual machines that are used.
Machine
XenServer
Client
AD.training.lab
XenApp65L
XenApp65S
Details
Hosts virtual machines
Used to test modifications made throughout the lab by launching
new sessions.
Active Directory Domain Controller.
London XenApp 6.5 server.
San Francisco XenApp 6.5 server.
Required Lab Credentials
Below is the login credentials required to connect to the workshop system and complete the lab exercises.
Machine
XenServer
All virtual machines (admin
logon)
All virtual machines (non-admin
logon)
Username
Please see handout
Training\Administrator
Password
Please see handout
Citrix123
LONUser1, SFOUser1
Citrix123
Page 3
Exercise 1: Fundamentals – Setting up the
Citrix PowerShell environment
Overview
In this exercise you will setup the requirements necessary in order to properly run Citrix PowerShell
commands in your environment.
Step by step guidance
1st Note: Throughout these labs we capitalize letters so that it is easier for you to read commands. This is
not a requirement since PowerShell is not case sensitive.
2nd Note: Although we use the term “command” and “cmdlets” interchangeably, the proper PowerShell
term is cmdlets.
Estimated time to complete this lab: 15 minutes.
Step Action
1.
In XenCenter click on XenApp65S.
2.
Then click on the “Console” tab on the top.
Page 4
Step
3.
4.
5.
Action
While this is not a requirement, using the “Switch to Remote Desktop” button on the top
right gives you a better user experience.
Login to the XenApp65S machine with the account training\administrator, password
Citrix123
In the XenApp65S machine launch the Windows PowerShell x86 command line tool which
is located under Accessories > Windows PowerShell.
Note: Some commands may not function in the x64 version. Use the x86 launcher.
Page 5
Step
6.
Action
The first step is to enable you to perform the commands at will. PowerShell is restricted by
default, which is a good security feature.
In order to lower this security, run the following command followed by enter:
Set-ExecutionPolicy unrestricted
7.
Type Y and press enter.
The security level will remain unrestricted until you restrict it again, regardless if you reboot
or logoff.
8.
Note: This is a lab environment; therefore there is minimum concern for security. It is
recommended that you either digitally sign your scripts or only unrestraint this when
performing commands in a production environment.
Attempt to get all published application names from the farm by using the following
command followed by enter:
Get-XAApplication
9.
10.
PowerShell returned an error, but it is very helpful. The first line is PowerShell telling you
that it doesn’t know what the command Get-XAApplication means.
Resolve the problem by adding the Citrix snap-ins to PowerShell by using the command
Add-PSSnapin Citrix*
Page 6
Step
11.
Action
It takes a while and all you get back is a prompt. PowerShell is good at telling you errors,
but it is seldom good at telling you that you did something right.
Check to see if the Citrix snap-ins were added by using the command:
Get-PSSnapin Citrix*
You should see a few snap-ins loaded:
12.
Now that the Citrix Snap-ins are loaded, try querying the XA farm again using the
command to get the applications:
Get-XAApplication
Page 7
Step
13.
Action
As a result, a lot of properties scrolled really fast and there is a lot of information to read
and understand. Let’s try to simplify this output a bit. Scroll up a bit and find the property
“DisplayName”
14.
The property DisplayName is the name that users see when interacting with Web Interface
or Online Plug-in. Using this information, filter the output from the Get-XAApplication
command by adding a pipe (right above the enter key) and the Format-Table command to
it:
Get-XAApplication | Format-Table DisplayName
15.
Note: The pipe, or “|”, is used to take the results that is to left of the pipe and perform
additional tasks with it, in this case a simple, but effective formatting technique.
Close PowerShell by typing:
Exit
Page 8
Step
16.
17.
Action
Open PowerShell again from Accessories > PowerShell, either Windows PowerShell x86.
Try to get the applications again by typing:
Get-XAApplication
Page 9
Step
18.
Action
PowerShell forgot all about the Citrix Snap-ins!
You can either add the Citrix Snap-ins every time you launch PowerShell, or you can install
the Citrix XenApp SDK. Installing the SDK will add shortcuts that launch PowerShell with
the Snap-ins pre-loaded.
The Citrix XenApp SDK is available for download via the Citrix Developer Network site at
http://community.citrix.com/cdn/xa/sdks, but to save time it is pre-downloaded and
located in C:\Citrix, it is named “XASDK6.5”:
Page 10
Step
19.
Action
Accept the License Agreement and click next:
Page 11
Step
20.
Action
Click Next since the execution policy restriction was previously set to “unrestricted”.
Page 12
Step
21.
22.
Action
Notice how some important items are already installed since XenApp is already on the
server.
Click on “Install” then click on “Finish”.
Page 13
Step
23.
Action
Launch the “Windows PowerShell with Citrix XenApp 6.5 Server SDK (x86)” from the
Start Menu.
It is located under All Programs > Citrix > XenApp 6.5 Server SDK
24.
Note: This also installed the Citrix XenApp 6.5 Server SDK Help file, which contains a lot
of documentation plus some good examples to get you started.
This will preload all snap-ins and give you some starting tips:
Page 14
Step
25.
Action
With the correct snap-ins attempt to list the applications again, the output should be correct
this time.
Get-XAApplication | Format-Table DisplayName
Summary
Key
Takeaways
NOTES
The key takeaways for this exercise are:

Where to launch the PowerShell Command Line executable from.

How to add Citrix Snap-ins

How to install and use the Citrix XenApp PowerShell SDK.

Execution policies are necessary to keep your environment safe!

You can perform commands without installing the Citrix XenApp
PowerShell SDK, which just provides some additional convenience
shortcuts and a help file. Installing the Citrix XenApp PowerShell SDK is
necessary if performing remote commands from a system that does not have
XenApp installed.
Page 15
Exercise 2: Setting session policies
Overview
In this exercise you will create a new Computer Policy and apply it to a specific XenApp Worker Group.
This policy will set the session’s color depth to 256 colors (8-bit) as the default for all users who connect
to the XenApp servers in the San Francisco OU.
Step by step guidance
Estimated time to complete this lab: 10 minutes.
Step Action
1.
Continue to work from the same XenApp server from the prior exercise: XenApp65S
2.
Before we are able to manipulate policies we need to create a PowerShell Drive (PSDrive)
Create a PSDrive with the following command:
New-PSDrive -Name LAB -PSProvider CitrixGroupPolicy -Root \ -DomainGPO
SfoOUpolicy
3.
Suggestion: You can use this PSDrive “LAB” throughout this lab as long as this PowerShell
window remains open.
Access the newly created PSDrive by using:
cd lab:
4.
Since we are working on a computer policy, access the computer path by using the
command:
cd computer
Page 16
Step
5.
Action
Finally, create the new policy by issuing the command:
New-Item SFOPolicy
6.
Set the new policy’s priority to be greater than the default Unfiltered policy:
Set-ItemProperty -Path SFOPolicy -Name Priority -Value 1
7.
Navigate to the following path so that we can apply a filter for our policy:
cd .\SFOPolicy\Filters\WorkerGroup
Page 17
Step
8.
Action
Filter the policy by creating a new filter called WGFilter:
New-Item WGFilter
9.
Navigate to the following path by using
cd lab:\computer\sfopolicy\settings\ica\graphics
10.
Apply the computer policy to the SFO OU by changing the policy’s property:
Set-ItemProperty –Path MaximumColorDepth -Name value -Value BitsPerPixel8
11.
You will use the cmdlet Get-ItemProperty. Since the output is several lines long you can
limit the output to display the changes made by using the pipe function fl value.
Display the policy’s property settings:
Get-ItemProperty MaximumColorDepth | fl value
We took some shortcuts to make typing simpler:
 The –Path parameter is omitted, however the path itself is required
(MaximumColorDepth).
 The alias fl was used to format the output, which stands for Format-List. Type
Get-Help Format* to see a list of formatting options.
Page 18
Step
12.
Action
On XenApp65S go to Start > Run and type GPMC.MSC to open Group Policy
Management. Then expand Forest: training.lab > Domains> training.lab > SFOOU
and select SFOOUPolicy
In the following dialog box check “Do not show this message again” and click OK
13.
Then select the Settings Tab and click on Show All button
14.
Check that the SFOPolicy, which you just created, is Enabled.
15.
You have completed exercise 2.
Page 19
Summary
Key
Takeaways
NOTES
The key takeaways for this exercise are:

How to create a PSDrive when manipulating policies.

How to create and manipulate Citrix polices directly in AD.

Long commands can be simplified with aliases.

PowerShell cmdlet parameters can be omitted; however, the parameter
values are required. To get more information about this type e.g. Get-Help
Get-ItemProperty –Full |more
Page 20
Exercise 3: Creating an application
Overview
In this exercise we will create an application and publish it to the SFO XenApp Server.
Step by step guidance
Estimated time to complete this lab: 10 minutes.
Step Action
1.
In XenApp65S close any PowerShell windows you have open.
2.
Still in XenApp65s open a fresh “Windows PowerShell with Citrix XenApp 6.5 Server SDK
(x86)” instance.
3.
Create a new application:
New-XAApplication -displayname SFOApp –CommandLineExecutable notepad.exe ApplicationType ServerInstalled | fl displayname
4.
Set the users and server for the application:
Set-XAApplication -BrowserName SFOApp -ServerNames "XenApp65s" -Accounts "SFO
Users"
Page 21
Step
5.
Action
Check to see if the application was properly created:
Get-XAApplicationReport SFOApp | fl Browsername, Machinename, Accounts,
CommandLineExecutable
6.
7.
8.
9.
10.
Note: You can also check in AppCenter to visually ensure that the app has been created.
Next we will verify if a user from the SFO Users group can connect to newly created
application.
In XenCenter, select the client machine. Login as followed:
Username: administrator
Password: Citrix123
Domain: training
Open Internet Explorer, browse to http://XD56 and login with the following account:
Username: sfouser1
Password: Citrix123
Domain: training
Launch the newly created SFOApp from the browser window. If Notepad is launched then
you’ve properly published an application by using PowerShell.
In XenCenter, go back to XenApp65S.
Delete an application by just changing the verb from New to Remove.
Try to delete the application you have just created:
Remove-XAApplication –Browsername SFOApp
11.
Note: Refresh the AppCenter by pressing F5, take note that the published SFOApp is no
longer published.
You have completed exercise 3.
Page 22
Summary
Key
Takeaways
NOTES
The key takeaways for this exercise are:

How to create and publish an application.

How to delete an application.

Used different verbs against the same noun.

By simply manipulating the verb you can affect an object in many different
ways. In this exercise you manipulated the XAApplication object by using
the following verbs:
o New, to create a new application.
o Set, to modify the application’s properties.
o Get, to list the application’s properties.
o Remove, to delete the application from the farm.
Page 23
Exercise 4: Exporting and importing
configurations
Overview
In this exercise you export all available applications and custom administrators from a farm, accidentally
delete this configuration from the farm and finally restore it from our export file.
Step by step guidance
Estimated time to complete this lab: 10 minutes.
Step Action
1.
In XenApp65S close any PowerShell windows you have open.
2.
Open a fresh “Windows PowerShell with Citrix XenApp 6.5 Server SDK (x86)” instance.
3.
Export the helpdesk administrator to an XML file:
Get-XAAdministrator "Training\SFOHelpdesk" | Export-Clixml c:\admin.xml
4.
Export all farm applications to an XML file:
Get-XAApplicationReport * | export-clixml c:\apps.xml
5.
Launch AppCenter from either of the XenApp65 servers. There should be a shortcut on the
desktop.
Page 24
Step
6.
Action
From AppCenter, delete the SFOHelpdesk administrator.
Page 25
Step
7.
8.
Action
Then delete all 3 Apps.
Back in Windows PowerShell, restore the helpdesk administrator from the XML file we
created earlier.
Import-Clixml c:\admin.xml | New-XAAdministrator
Page 26
Step
9.
Action
And then restore the applications as well:
Import-Clixml c:\apps.xml | New-XAApplication
10.
11.
Refresh the AppCenter verify that both SFOHelpdesk and the apps are restored.
You have completed exercise 4.
Summary
Key
Takeaways
NOTES
The key takeaways for this exercise are:

How to export farm configurations.

How to import farm configurations.

Citrix PowerShell cmdlets provide you powerful ways to export and import
farm objects. Some of these commands are not available through the
AppCenter.
Exercise 5: Copying and setting application
properties
Overview
In this lab you are introduced to the Windows PowerShell ISE to perform a bit more complex scenario.
You will take a set of applications and copy them to two different folders and assign specific users and
servers to each of these applications.
Page 27
Below is a representation of what you will achieve:
Step by step guidance
Estimated time to complete this lab: 15 minutes.
Step Action
Page 28
Step
1.
Action
In XenApp65S, launch the Windows PowerShell ISE as an administrator from the desktop.
Page 29
Step
2.
Action
Add the Citrix Snap-ins by typing the following command in the bottom section of the ISE
window:
Add-PSSnapin Citrix*
Page 30
Step
3.
Action
Next create a new function. This function will require 3 parameters:
1) The office location.
2) The server name to add to the applications.
3) The AD account to add to the applications.
function CreateApps ($location, $servername, $account)
{
}
4.
Within the brackets, create a command that will be used to create the application folder
based on the location name.
New-XAFolder "Applications\$location"
5.
Still within the brackets, create another command to copy all applications to the new folder.
Get-XAApplication -folderPath "Applications" | foreach-object {CopyXAApplication -BrowserName $_.BrowserName -FolderPath
"Applications/$location"}
Page 31
Step
6.
Action
Within the brackets, input the command to rename the applications so that they’re specific
to their location.
Get-XAApplication -folderPath "Applications/$location" | foreach-object
{Rename-XAApplication $_.BrowserName -NewBrowserNameHint ($location +
$_.BrowserName) -NewDisplayName($location + $_.DisplayName)}
7.
To complete this function, create the command that will place the correct users and assign
the desired servers to the applications.
Get-XAApplication -folderPath "Applications/$location" | foreach-object {SetXAApplication -BrowserName $_.BrowserName -ServerNames $servername -Accounts
$account}
8.
Now that the function is complete, call it twice to create a San Francisco and a London
setup with two simple commands that will go after the closing bracket:
CreateApps "LON" "XenApp65L" "Training\LON Users"
CreateApps "SFO" "XenApp65S" "Training\SFO Users"
Page 32
Step
9.
10.
Action
The script is ready to be run, so click on play or press “F5”.
In the middle section (Output Pane), there should be an output similar to this:
Page 33
Step
11.
Action
If there are no errors, then the command executed correctly. Confirm it by checking
AppCenter, where you should have 2 new sets of folders and apps, with correct server and
user assignments.
Page 34
Step Action
12. YYou have completed exercise 5.
Summary
Key
Takeaways
NOTES
The key takeaways for this exercise are:

How to copy applications to folders and customize their settings

How to create and call functions in Windows PowerShell ISE

Citrix XenApp commands allow you to automate many arduous AppCenter
tasks.

The PowerShell ISE is more visually intuitive and should be used to create
complex projects.
Exercise 6: Deploying XenDesktop Machines
Overview
In this exercise you will create a single catalog, and then assign machines, users and policies to two
different desktop groups based on separate locations.
Step by step guidance
Estimated time to complete this lab: 15 minutes.
Step Action
Page 35
Step
1.
Action
In XenCenter select XD56 and click on the console tab to access the XenDesktop desktop
broker.
2.
Launch PowerShell from the Citrix Desktop Studio. The button is located under Desktop
Studio > PowerShell tab.
Note: This method automatically adds the Citrix Snap-ins to PowerShell.
Page 36
Step
3.
Action
Add a new catalog in the broker by using the following command:
New-BrokerCatalog -AllocationType Random -CatalogKind Unmanaged -Description
"Windows 7 Desktops" -Name "Desktops"
4.
In order to add a machine to the catalog you will need to specify the XenDesktop broker
name by using the –AdminAddress parameter. Then we get the Catalog’s UID and finally
add the machine. Type the following command to add a machine to the previously created
catalog.
New-BrokerMachine -AdminAddress "XD56.training.lab:80" -CatalogUid $(GetBrokerCatalog | where-object{$_.name -eq "Desktops"}).UID -MachineName
"Training\Win7VDA1"
Page 37
Step
5.
Action
Add the second machine. Instead of retyping this command line, use the up arrow key to
bring up the previous command and change the machine name from Win7VDA1 to
Win7VDA2.
New-BrokerMachine -AdminAddress "XD56.training.lab:80" -CatalogUid $(GetBrokerCatalog | where-object{$_.name -eq "Desktops"}).UID -MachineName
"Training\Win7VDA2"
6.
Now create a desktop group for the LON location by using New-BrokerDesktopGroup.
New-BrokerDesktopGroup -Name "London Desktops" -PublishedName "London
Desktops" -DesktopKind Shared -AdminAddress 'XD56.training.lab:80'
7.
Create the desktop group for the SFO location as well. You can use the arrow up key and
just modify the highlighted strings to “San Francisco Desktops”.
New-BrokerDesktopGroup -Name "San Francisco Desktops" -PublishedName "San
Francisco Desktops" -DesktopKind Shared -AdminAddress 'XD56.training.lab:80'
8.
Add a machine to the London Desktops group.
Add-BrokerMachinesToDesktopGroup -Catalog "Desktops" -DesktopGroup "London
Desktops" -Count 1 -AdminAddress "XD56.training.lab:80"
Page 38
Step
9.
Action
Finally add a machine to the San Francisco Desktop group.
Add-BrokerMachinesToDesktopGroup -Catalog "Desktops" -DesktopGroup "San
Francisco Desktops" -Count 1 -AdminAddress "XD56.training.lab:80"
10.
Back in Desktop Studio, verify that the Catalog and Desktop Groups were properly created.
11.
You have completed exercise 6.
Page 39
Summary
Key
Takeaways
The key takeaways for this exercise are:

Manipulate all deployment actions by using BrokerDesktopGroup,
BrokerMachine and BrokerCatalog objects.

By launching the PowerShell from Desktop Studio it automatically loads the
Citrix Snap-ins.

Use the Up-Arrow to bring back a previously used command.
NOTES
Exercise 7: Assigning XenDesktop users and
administrators
Overview
Building from the previous exercise, you will assign administrators to manage the created Desktop Groups
as well as enable users to access their machines. This exercise dives into Broker Access Policies, which are
useful when using Machine Creation Services through PowerShell.
Step by step guidance
Estimated time to complete this lab: 15 minutes.
Step Action
1.
Continue using machine XD56 from the previous exercise. Re-launch PowerShell if
necessary.
Page 40
Step
2.
Action
The first thing we need is the UID (Unique Identifier) of each newly created Desktop
Group.
Type the following command which limits the output only to Desktop Group Name and
UID by using the filter “| format-table name, UID”:
Get-BrokerDesktopGroup | format-table name, UID
3.
Note: You UIDs may be different than the ones in the screenshot above.
Enable access to the desktop broker to the “LON Users” AD group:
New-BrokerUser -Name 'Training\LON Users'
4.
Do the same for the “SFO Users” AD group:
New-BrokerUser -Name 'Training\SFO Users'
Page 41
Step
5.
Action
Now that you have the pre-requirements out of the way, you can finally assign users to the
Desktop Groups.
Let’s start with the “LON Users” AD user group, as we previously looked up, the UID for
the London Desktops is 12:
New-BrokerEntitlementPolicyRule -DesktopGroupUid <Uid from step 2> –Enabled
$True -IncludedUsers @('TRAINING\LON Users') -Name 'London Desktops'
6.
Now complete the user assignment by using assigning the “SFO Users” AD user group to
the “San Francisco Desktops” desktop group. Remember to reference the UID for San
Francisco from a few steps back.
New-BrokerEntitlementPolicyRule -DesktopGroupUid <Uid from step 2> –Enabled
$True -IncludedUsers @('TRAINING\SFO Users') -Name 'San Francisco Desktops'
Page 42
Step
7.
8.
Action
If you still don’t trust PowerShell by now, check to see if the users were properly created in
Desktop Studio, under Assignments > Right click the Desktop Group Name > Select Edit
Desktop Groups.
You should see the correct users assigned under the “Users” tab.
Page 43
Step
9.
Action
Now you need to allow these users to access your desktop groups. Since you are dealing
with a lockdown policy, there are many parameters to cover, so the command is quite long.
Start with the London users:
New-BrokerAccessPolicyRule -AllowedConnections 'NotViaAG' -AllowedProtocols
@('RDP', 'HDX') -AllowedUsers 'AnyAuthenticated' -Enabled $true IncludedDesktopGroupFilterEnabled $true -IncludedDesktopGroups @('London
Desktops') -IncludedSmartAccessFilterEnabled $true -IncludedUserFilterEnabled
$true -Name "LON Access"
This is a pretty open access policy where any authenticated user coming from any
connection will be able to access the desktop group.
Page 44
Step
10.
Action
Do the same for the SFO users, this time, just use the up-arrow key and then replace the
highlighted strings:
New-BrokerAccessPolicyRule -AllowedConnections 'NotViaAG' -Al
lowedProtocols @('RDP', 'HDX') -AllowedUsers 'AnyAuthenticated' -Enab
led $true -IncludedDesktopGroupFilterEnabled $true -IncludedDesktopGr
oups @('San Francisco Desktops') -IncludedSmartAccessFilterEnabled $t
rue -IncludedUserFilterEnabled $true -Name "SFO Access"
Notice that there are many more options to set, which would’ve made the command even
longer!
Page 45
Step
11.
Action
Check your incredible accomplishment!
In XenCenter, select the client machine. Login as followed:
Username: administrator
Password: Citrix123
Domain: training
12.
Open Internet Explorer, browse to http://XD56 and login with the following account:
Username: sfouser1
Password: Citrix123
Domain: training
13. YYou should be able to launch the “San Francisco Desktops” desktop
o
14.
You have completed exercise 7.
Page 46
Summary
Key
Takeaways
NOTES
The key takeaways for this exercise are:

Using the Broker Access policies to lockdown access.

Interacting with Active Directory to add user access to catalogs.

There is a side-effect when creating access policies through PowerShell.
Desktop Studio loses track of these policies and the following warning will
be displayed:
Exercise 8: Customizing a XenDesktop group
icon.
Overview
You will use simple commands to help users differentiate one site’s Desktop Group from another by
customizing its icon displayed in Web Interface.
Step by step guidance
Estimated time to complete this lab: 10 minutes.
Step Action
Page 47
Step
1.
2.
3.
4.
5.
Action
From XenCenter connect to XD56.
Launch the Desktop Studio from the desktop.
Navigate through Access > Citrix Web Interface > XenApp Web Sites
On the center pane, right-click on the “Internal Site”, then click on “Web Site Appearance”.
Click on the Layout button.
Page 48
Step
6.
7.
8.
Action
Then click on tab settings and change the selection from “Separate tabs” to “Single Tab”,
then click “OK”.
In XenCenter, select he client machine, login as training/administrator, password
Citrix123
Launch Internet Explorer and navigate to http://xd56
Page 49
Step
9.
Action
Login as training/LonUser1, password Citrix123
Page 50
Step
10.
11.
Action
Notice the default icon for the London Desktop Group.
In XenCenter, go back to XD56, and start the Windows PowerShell ISE as an
administrator, it is located on the desktop.
Page 51
Step
12.
Action
Add the Citrix Snap-ins by typing the following command in the bottom section of the ISE
window:
Add-PSSnapin Citrix*
13.
Start building the script with the command Get-CtxIcon.
This will get the icon from a Windows executable and store it on the $newIcon variable for
future use.
$newIcon = Get-CtxIcon -FileName C:\Windows\System32\colorcpl.exe -index 0
Page 52
Step
14.
Action
Now that you have an icon, set another variable that will be used to transfer the new icon to
the XenDesktop Broker.
$brokerIcon = New-BrokerIcon -EncodedIconData $newIcon.EncodedIconData
15.
Store the ‘London Desktops’ desktop group in a variable so that we can eventually apply the
new icon to it.
$desktopGroup = Get-BrokerDesktopGroup -Name 'London Desktops'
16.
Finally, apply the icon to the London Desktops group by modifying the IconUid value with
the following cmdlet:
Set-BrokerDesktopGroup $desktopGroup -IconUid $brokerIcon.Uid
17.
The script is now ready to be executed, do so by pushing the play button:
Page 53
Step
18.
19.
Action
To verify the change, select the client machine in XenCenter.
Log back in to the web interface as training\LonUser1, password Citrix123
Page 54
Step Action
20. \You should see the updated icon.
21.
You have completed the last exercise.
Page 55
Summary
Key
Takeaways
NOTES
The key takeaways for this exercise are:

The Citrix PowerShell SDK offers customizations not exposed in the
Desktop Studio.

Using variables through your scripts can save a lot of retyping by storing
values for future use.

The larger desktop icon cannot be replaced in this method.
Page 56
Revision History
Revision
Change Description
Updated By
Date
1.0
Original Version
Pedro Tramont
05/7/2012
1.1
Removed connection information
Attila Valyi
5/31/2012
About Citrix
Citrix Systems, Inc. (NASDAQ:CTXS) is the leading provider of virtualization, networking and software as a service
technologies for more than 230,000 organizations worldwide. Its Citrix Delivery Center, Citrix Cloud Center (C3)
and Citrix Online Services product families radically simplify computing for millions of users, delivering applications
as an on-demand service to any user, in any location on any device. Citrix customers include the world’s largest
Internet companies, 99 percent of Fortune Global 500 enterprises, and hundreds of thousands of small businesses
and prosumers worldwide. Citrix partners with over 10,000 companies worldwide in more than 100 countries.
Founded in 1989, annual revenue in 2008 was $1.6 billion.
http://www.citrix.com
© 2012 Citrix Systems, Inc. All rights reserved. Citrix®, Citrix Delivery Center™, Citrix Cloud Center™,
XenApp™, XenServer™, NetScaler®, XenDesktop™, Citrix Repeater™, Citrix Receiver™, Citrix Workflow
Studio™, GoToMyPC®, GoToAssist®, GoToMeeting®, GoToWebinar®, GoView™ and HiDef Corporate™ are
trademarks of Citrix Systems, Inc. and/or one or more of its subsidiaries, and may be registered in the United States
Patent and Trademark Office and in other countries. All other trademarks and registered trademarks are property of
their respective owners.
Page 57