Overview

One of the important features of Citrix Director is Help Desk and User Details. These pages provide required Information pertaining to a particular user session and helps troubleshoot issues with the session.

Director employs Windows Management Instrumentation (WMI) on Desktop OS and Server OS VDI Machines to get some of the session and user specific details. Director fetches this information from preinstalled Windows WMI objects and Citrix specific WMI providers installed during VDA installation.

It is important to mention here that there is substantial difference between Director 7.x and earlier versions of Director.

  • Director 2.1 and earlier versions use WinRM Call to fetch data from WMI objects whereas Director 7 and later versions does not use WinRM
  • Director 7 has its own plugin deployed on Desktop OS and Server OS machines to get some of the performance metrics and session specific details thereby removing the need of configuring WinRM.

This blog is mainly to provide WMI Objects used by Director and give basic examples of how to get the same from PowerShell.

What This Blog Covers:

  1. List of all WMI Objects Used by Director 7 and later with examples of how to query WMI by PowerShell.
  2. List of all WMI Objects Used by Director 2.1 (and earlier) and through WinRM with Examples of how to query WMI by PowerShell.
  3.  Configuring WINRM
  4. Issues that affect rendering WMI Data on Director.

 WMI Objects Used In Citrix Director 7.0 And Later:

Here is the list of all WMI objects used by Director 7 and later versions.

Objects are categorized according to Panels it populates in Director User Details Page.

Here the Director Fields column is the field shown in Director User Detail Page in corresponding panels.

Example: RAM of the Desktop running the session is shown in Director User Details Page as Memory

 How to get the same data in PowerShell:

To get WMI Data, run below command in PowerShell of the Desktop OS and Server OS Machines:

Get-wmiobject –Class “classname” –Namespace “namespace”

 Machine Details Panel that provides machine specific details:     

Director Fields

Namespace

Class

Memory

Root\cimv2     

Win32_ComputerSystem

vCpu

Root\cimv2

Win32_ComputerSystem

Hard Disk

Root\cimv2

Win32_LogicalDisk

DiskTransfersPersec

Root\cimv2

Win32_PerfFormattedData_
PerfDisk_PhysicalDisk

CurrentDiskQueueLength

Root\cimv2

Win32_PerfFormattedData_
PerfDisk_PhysicalDisk

Panel that provides user and computer specific policies applied:

Director Fields

Namespace

Class

User Specific Policy

Root\rsop

CitrixRsopProviderClass

Computer Policy

Root\rsop

CitrixRsopProviderClass

  Note: Retrieving policy data is done by methods GetRsopRawData, GetRsopRawDataForSession

But values Returned by them is binary which is then processed by Director

Personalization Panel that provides user profile data and PVD information:

Director Fields

Namespace

Class

Profile

Root\Citrix\profiles\metrics

Session

(Profile Provider property)

Profile data

Root\Citrix\profiles\metrics

Diagnostics

(Network Latency Property)

Profile data path

Root\Citrix\profiles\metrics

Session

Profile Size

Root\Citrix\profiles\metrics

Session

Redirected Folder

Root\Citrix\profiles\metrics

Diagnostics

Usage

Root\Citrix\profiles\metrics

Diagnostics

Contents

Root\Citrix\profiles\metrics

Diagnostics

PVD enabled/disabled

Root\citrix

Citrix_PvDInfo

PVD state

Root\citrix

Citrix_PvDPool

PVD App Size

Root\citrix

Citrix_PvDPool

PVD Profile Size

Root\citrix

Citrix_PvDPool

  Note:

   To get the data from diagnostics object execute the following cmdlets:

1.         $a.runhealthcheck()

2.        $a=get-wmiobject –namespace root\citrix\profiles\metrics  –class session –filter “sessionid=’sessionid’”  (Here sessionid is    the id of the session for which you need data)

   (Note: SessionId is the same as SessionKey in broker which we get in get-brokersession cmdlet)

3.        Get-wmiobject -namespace root\citrix\profiles\metrics  -class diagnostics

  Detailed information of User Profile Data through WMI is provided here.

 

  WMI Objects Used In Citrix Director 2.1 And Earlier Versions:

  Director  uses WinRM to get the Data from Remote Machines.

  Machine Details Panel that provides machine specific details:

Director Fields

Namespace

Class

Memory

Root\cimv2 

Win32_computersystem

vCPU

Root\cimv2

Win32_computersystem

Hard Disk

Root\cimv2

Win32_logicaldisk

 

 Session Panel that provides session specific details:

Director Field

Namespace

Class

Latency

Root\cimv2

Win32_PerfFormattedData_

PerfDisk_PhysicalDisk

 

  Policy Panel that provides user and computer specific policies applied:

Director Fields

Namespace

Class

 Policy(User Specific)

Root\rsop

CitrixRsopProviderClass

Policy(Computer)

Root\rsop

CitrixRsopProviderClass

  Note: Retrieving policy data is done by methods GetRsopRawData,

          GetRsopRawDataForSession

          But values Returned by them is binary which is then processed by director

 Logon Duration:

Director Fields

Namespace

Class

Logon Duration

root\Citrix\profiles\metrics

LogonTimings

Configuring WinRM:

Necessary steps for Rendering Data via WinRM are:

1.       WinRM and WMI must be configured with both services running in VDI/RDS Machines

2.       Users who wants to view data through WinRM in Director needs to have permissions.

 Please refer the link for providing Director Users with permissions to view WinRM Data.

 Also Provided is the link to troubleshoot WinRM:

 

 Issues that affect rendering WMI Data on Director:

   Below is the list of issues that frequently arise while rendering WinRM Data on Director 2.1

Issue

Director Log Error

LINK

WinRM service not running

Unable to connect to WinRM

link

WMI Service not running

Unable to connect to WinRM

 

WinRM port not configured

Unable to connect to WinRM

link

Director user does not have permissions to view WinRM data

Unauthorized exception

link

  

 Other Tools to Troubleshoot WMI Objects:

1)          WBEMTEST : Preinstalled tool in Windows where we can connect to a namespace and execute WMI Query

2)         MMC Snap in: Open MMC console(type mmc in windows explorer).Right click Console and select ADD/Remove Snap  in.

       Select WMIControl and click Add. WMIControl appears in left pane. Right Click and select Properties. We can see all the namespaces/providers installed.

3)       WMIC: WMI Command line Interface that can be used instead of PowerShell .

 Sample Failure Scenarios where Above Given information Can be used:

1)     Consider a scenario where Memory, hard disk and vCPU info are not coming up in Machine Details Panel in User Details Page of Director.

      This might be due to two reasons:

  • 1)                   Some fields/properties is null in WMI object or
  • 2)                   Director fails to extract data provided by WMI Objects  and populate it.

      In order to verify whether WMI Objects contain data or not we have to look into the desktop or server machine for which we are not getting the data.

      Open PowerShell in the machine and execute following CmdLets:

     Get-WmiObject –Namespace root\cimv2 –Class Win32_ComputerSystem | select *

     Verify Value of TotalPhysicalMemory and NoOfLogicalProcessors

     Get-WmiObject –Namespace root\cimv2 –Class Win32_logicaldisk

     Verify Value of Size field.

     If one of the fields above has no value Director will be unable to retrieve data.

 

    2) Another Failure Scenario would be Personalization Panel In User Details Page Showing Error “Cannot Retrieve Data”

     In this scenario, as we are dealing with Citrix Specific Classes there might be failure due to:

  • 1)             WMI Namespace/Provider might not have been installed
  • 2)            WMI Object instance might not have been created
  • 3)            Some fields/properties is null in WMI object

4)             

      To troubleshoot the problem, execute following cmdlets in the Desktop/Server Machine:

     Get-WmiObject  -Namespace root\citrix\profiles\metrics –Class Session –Filter “SessionId= SessionIdoftheSession’”

     (SessionId corresponds to SessionKey in broker for a  session. Required SessionId and other information of sessions

     can be found  through get-brokersession in broker)

     If WMI Provider is not installed “Invalid Class” Error is thrown.

     If result is empty it means Session Class does not have  object instance created for that particular session.

     If any of the fields is empty(null value) that might be the reason for Panel to not display Profile Details in Director