Automating XenApp 6.5 Part 1 of 4 - Citrix Administrators

Did you ever want to fully automate your XenApp 6.5 farm? Did you manage an automated unattended installation or image, but  you are struggling to automate farm configurations? Would you like to learn how to create and configure administrators for XenApp 6.5 with PowerShell? In this case, this article is just for you.

Automating Citrix consists of various components. You need to configure:

  • Citrix administrators (explained in this article)
  • Citrix worker groups
  • Citrix user and computer policies
  • Citrix load evaluators
Note: see the article PowerShell Fundamentals if you are new to PowerShell or if you just want to refresh your memory. Especially important is the part about loading snap-ins and modules. Remember, the appropriate extensions need to be loaded before Citrix commands can be executed!

Creating and configuring Citrix administrators using PowerShell

Citrix distinguishes three types of administrators:

  • Full administrators;
  • View only administrators;
  • Custom administrators.

"Full" and "view only" administrators are the easiest to create, because their security permissions are predefined and do not need further customizing.  Use the following command lines to create a "full" and/or "view-only" administrator:

Note: make sure that the necessary Active Directory security groups exist before creating Citrix administrators.

Creating a custom administrator is more complex than a "full" or "view-only" administrator since you have to specify each individual security permission.  To add to the complexity; some settings can be configured when creating the custom administrator; other settings have to be configured afterwards.

Example:
You want to create a custom Citrix administrator for one of the support departments. This custom administrator should be able to view most, but not all, items in the Citrix console. Additionally the administrator has to be able to see all user sessions and perform basic tasks such as view sessions and log off users.

The first step is to create the new administrator and provide this administrator with the necessary farm permissions:

A second command line is necessary since the previous one does not add custom permissions to the "Servers" folder:

To find out the exact names of each individual security permission you can check the Citrix PowerShell SDK or use the "Get-Help" function in PowerShell:

Or, to make life even easier, you can simply check the two lists below which I have prepared for you.

FarmPrivileges:

  • ViewFarm
  • EditZone
  • EditConfigurationLog
  • EditFarmOther
  • ViewAdmins
  • LogOnConsole
  • LogOnWIConsole
  • ViewLoadEvaluators
  • AssignLoadEvaluators
  • EditLoadEvaluators
  • ViewLoadBalancingPolicies
  • EditLoadBalancingPolicies
  • ViewPrinterDrivers
  • ReplicatePrinterDrivers

FolderPrivileges:

  • ViewApplications
  • EditApplications
  • TerminateProcessApplication
  • AssignApplicationsToServers
  • ViewServers
  • EditOtherServerSettings
  • RemoveServer
  • TerminateProcess
  • ViewSessions
  • ConnectSessions
  • DisconnectSessions
  • LogOffSessions
  • ResetSessions
  • SendMessages
  • ViewWorkerGroups
  • AssignApplicationsToWorkerGroups

A professional (PowerShell) script needs more than a single line of code of course. In a professional script you need to:

  • Add comments (e.g. script name, author, date and purpose of the script);
  • Load the Citrix cmdlets;
  • Check if the administrator(s) exist;
  • Create the administrator(s) when needed;
  • Log actions and results.

Below follows an example of such as script.

Related articles:

Share this post:
Dennis Span on EmailDennis Span on LinkedinDennis Span on Twitter
Dennis Span
Dennis Span
Dennis Span works as a Senior Citrix Architect for a large insurance company in Vienna, Austria. He holds multiple certifications such as CCE-V, CCIA and CCEA. In 2017, Dennis became a Citrix Technology Advocate (CTA). Besides his interest in virtualization technologies and blogging, he loves spending time with his family as well as snowboarding, playing basketball and rowing. He is fluent in Dutch, English, German and Slovak and speaks some Spanish.

2 thoughts on “Automating XenApp 6.5 Part 1 of 4 - Citrix Administrators

  1. Pingback: Automating XenApp 6.5 Part 4 of 4 - Citrix Load Evaluators - Dennisspan.com

  2. Pingback: Automating XenApp 6.5 Part 2 of 4 - Citrix Worker Groups - Dennisspan.com

Leave a Reply

Your email address will not be published.

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.