Monitoring XenApp with WMI – Part 1: Basics

It has been a long time ago since I last created a new post. Time for a new one! I’ve created a series of posts about starting ICA connections programmatically (by using PowerShell). These posts were about the client-side of ICA connections; in this series, I will talk about using the Windows Management Instrumation (WMI) which allows you to monitor your XenApp environment.

While Citrix did document something on eDocs, it’s not a highly-documented feature. This feature is actually quite useful when, for example, monitoring your environment.

This post is not about WMI basics, so I expect that you already know what WMI is and how it’s used. I’ll be using PowerShell as an example, but any scripting/programming language can be used to access the WMI classes. To get more information about WMI in general, visit the Microsoft MSDN site.

The Citrix WMI namespace

Citrix provided two types of WMI providers; one provider for Citrix Licensing and one provider for XenApp. In this part, I will focus on the XenApp WMI provider, which is available under the following namespace:

root\citrix

This namespace is available on your XenApp servers. Note that this namespace is the root of others:

root\citrix\hdx
root\citrix\Management

We will be focussing on the “root\citrix” namespace. To get a list of all classes available in this namespace, we will be using PowerShell. I chose PowerShell for this, since it provides easy methods to get information about WMI classes and namespaces. The easiest way to use the WMI provider, is to log in to one of your XenApp servers as an administrator and start PowerShell. To get the list of classes, execute this PoSh command:

Get-WmiObject -Namespace root\citrix -List

This will output the complete list of available classes within the “root\citrix” namespace. If you would be using this from a remote location (eg. your management workstation), you have to provide the XenApp server name:

Get-WmiObject -ComputerName XENAPPSERVER -Namespace root\citrix -List

Keep in mind that you need correct permission to be able to access the WMI provider. To define the correct credentials, you can use the “-Credential” argument in PowerShell:

Get-WmiObject -Credential (Get-Credential) -ComputerName XENAPPSERVER -Namespace root\citrix -List

This will popup a nice credential input form:

Credential input box
Credential input box

Classes list

If your command executed without errors, you will see the complete list of classes available under the “root\citrix” namespace. The useful classes are these:

  • Citrix_AccountAuthority
  • Citrix_ApplicationFolder
  • Citrix_Farm
  • Citrix_Folder
  • Citrix_Group
  • Citrix_Happening
  • Citrix_License
  • Citrix_License_Group
  • Citrix_LicensesAssignedToServer
  • Citrix_LicensesInLicenseGroup
  • Citrix_LicensesInUseByServer
  • Citrix_Product
  • Citrix_Purge_ZoneElection_Happening
  • Citrix_Schema_Version
  • Citrix_Server
  • Citrix_ServerFolder
  • Citrix_ServersInFolder
  • Citrix_ServersInZone
  • Citrix_User
  • Citrix_UsersInGroup
  • Citrix_Zone
  • Citrix_ZoneElection_Happening
  • CitrixEvent
  • MetaFrame_Application
  • MetaFrame_Application_LoadLevel
  • MetaFrame_ApplicationsPublishedOnServer
  • MetaFrame_ApplicationsRunningOnServer
  • MetaFrame_AppsForGroup
  • MetaFrame_AppsForUser
  • MetaFrame_AppsInFolder
  • MetaFrame_AppsInSession
  • MetaFrame_DisconnectedSession_Happening
  • MetaFrame_Farm
  • MetaFrame_ICA_Client
  • MetaFrame_InstalledSoftware
  • MetaFrame_Process
  • MetaFrame_ProcessesInSession
  • MetaFrame_Purge_DisconnectedSession_Happening
  • MetaFrame_Schema_Version
  • MetaFrame_Server
  • MetaFrame_Server_LoadLevel
  • MetaFrame_Session
  • MetaFrame_SessionLite
  • MetaFrame_Software
  • MetaFrame_Win_Application
  • MetaFrame_Win_Farm
  • MetaFrameEvent
  • MFCreatePubAppFolder
  • MFCreateSvrFolder
  • MFDeletePubAppEvent
  • MFDeletePubAppFolder
  • MFDeleteSvrFolder
  • MFMovePubAppEvent
  • MFMovePubAppFolder
  • MFMoveServer
  • MFMoveSvrFolder
  • MFPublishAppEvent
  • MFRenamePubAppFolder
  • MFRenameSvrFolder
  • MFUpdatePubAppEvent

In the next part of this series, I will go more in-depth about some of these classes. Hope this has been useful for you. If you have any questions/remarks, feel free to leave a comment or contact me at me@florisvanderploeg.com.

Note that these WMI classes are for XenApp 6.5. If you’re using a different version of XenApp, the classes list may differ.

That was it for the WMI basics. In part 2, I will cover monitoring XenApp servers.

Leave a Reply

Your email address will not be published. Required fields are marked *

Complete the following sum: * Time limit is exhausted. Please reload CAPTCHA.

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