Managing WMI profiles

12:44 PM
Managing WMI profiles -

Profile Management provides run time information in the form of WMI objects. This includes the provider profile, profile type, size, disk usage, product details, timestamps of different triggers occurred during connection and disconnection, the current configuration, etc. These WMI objects are consumed and displayed in the Director console session information.

This article details the WMI objects and how to query the use PowerShell

Note :. WMI objects profile management are only available on the XenDesktop deployment from 7.0

What this article covers?

This article covers all WMI objects related to the execution time of the measures that are published by Profile management for each session. This article also contains some basic examples of how to query WMI objects using PowerShell.

This article does not cover all the details of WMI itself. See the following article for more information on WMI:

http://msdn.microsoft.com/en-us/library/aa394582 (v = vs.85) .aspx

When should I use these WMI objects

Runtime information about profiles can help to answer the following questions: -

  • What technology is the management of a profile? Is it a Microsoft or Citrix roaming profile profile?
  • What kind of profile is loaded? Is it a local profile, a model profile, or another type of profile?
  • What is the size of the disk is allocated to my profile on the network drive? How my profile used? How many files are in my profile?
  • What is the time required to manage different profile activated by the connection and disconnection? My system is slow - is it due to the load profile
  • Can I generate disk diagnostic information to my profile store at this point in time

The most of this information can be obtained only from the director, a XenDesktop console. The same information is available on each endpoint in the form of ofWMIobjects that can be queried or even automated if necessary.

Managing WMI Object model profiles

The Profile Management solution provides the following WMI classes for different application. All these WMI classes can be queried using programming interfaces, command line, and PowerShell. All the WMI classes profile management are recorded under " Root Citrix Profiles metric " namespace.

The image below shows the types and methods available in all WMI classes for programmatic access using WMI API.

common SessionId field

the string SessionId field is available in each class manage multiple sessions hosted server. There may be multiple instances of WMI objects in the same class that has a key value in the single sign SessionId area that provides mapping 1-1 to the respective session in the system. the field will SessionId used to identify the session and thus the user.

section PowerShell examples shows how to use this field in SessionId PowerShell to the list of items for a specific session and the current session.

session

provides details of the profile information on the session. This object can be used to query the disk usage data for the profile store and also to the way of the redirected folder.

ProfileProvider (integer)

Indicates who is handling the profile

value Service
0 profile managed by management Citrix profile
1 Microsoft roaming profile
2 Other

profile type (integer)

Specifies the type of profile

value Service
0 profile managed by one of the suppliers listed in the filed ProfileProvider
1 temporary profile
2 mandatory profile that erases all profile data users for this session at logoff
3 Roaming profile
4 unknown type

ProfileFolderCount (integer)

Number of records in the profile

ProfileFileCount (integer)

Number of files in the profile

ProfileSize (integer)

size the total for the user profile folder

Void RunHealthCheck ()

a WMI method or group that can be called each object WMI session for disk data linked. This method creates array of diagnostic objects (one for each network location) if not present for the session or it updates existing diagnostic objects with the new calculated value. The network location here refers to the profile store location or a different location where each special folder is redirected.

Diagnostics

Contains information related to disk for storing profiles and folder redirection, including the network path.

There may be several objects of this type for each location profile to the store or the root profile folder and for each folder on the network, such as "Documents" redirected.

FolderName (String)

name of the special folder redirected or store name's profile folder in the path profile store

FolderGuid (String)

GUID for the network path that can be used to identify the folder if the folder names are localized

SmbPath (String)

path to the actual location of the network

NetworkLatency (Integer)

whether profile managed online or off -line

value Service
-1 Offline, no network connection and no active sync enabled
1 online

DiskQuota (Integer)

total size allocated to the network location to the user associated with the session

DiskUsage (Integer)

total number of bytes consumed by the user for that session.

LogonTimings

Provides various timestamps Profile Management triggers that occurred during the login process.

timestamps here can be used to calculate different time period the tasks performed and the logon process.

FieldID description notes
DesktopReady the time the office has become available to the user duration between the logon process start and DesktopReady gives the total time log for this session.
ProfileLoadStart time the profile began loading the difference between them gives the time the load profile for the session data.
ProfileLoaded time the profile finished loading
GroupPolicyStart time the group policy processing started gives the difference between the processing time for group policy for the given session.
GroupPolicyComplete time the treatment over time Group Policy
LogonScriptStart start time of the opening of boot session both together give the logon script execution time that is displayed in the manager console.
LogOnScriptComplete Time the startup script is finished

LogoffTimings

provides time stamps of various profile management triggers that occurred during the previous logoff process.

timestamps here can be used to calculate the time interval for the different tasks that are performed along with the logon process.

FieldID description notes
LogoffStart start disconnection process time the difference between these provides the logout processing time.
LogoffCompleted time that ended disconnection process
RegistryProcessingStart start time of treatment Registration the difference between these provides duration.Registry registry processing values ​​for the current user is processed and stored in the profile store.
RegistryProcessionComplete time arrival record of treatment
FileSystemProcessingStart synchronizing files and related files start time processing system provides the difference between the execution time of the logon script, which is displayed in Director.
FileSystemProcessingComplete file synchronization and overhead related finishing processing files
CPSProcessingStart cross-platform settings start time of treatment the difference between these provides the processing of cross-platform time to set
CPSProcessingComplete Cross-platform settings time after treatment

product

Gets the profile management version of the channel in the version field, and if the profile management is enabled or disabled in the enabled field.

Configuration

string Get Configuration (string section, string key)

string GetEffectiveConfiguration (section string Provides methods for configuring the session., string key)

the methods above lists each element of the policy profile management support and its corresponding value for

given session

PowerShell Example

1. management WMI class profiles can be listed using the following command in PowerShell

Get-WmiObject -nameSpace "root citrix profiles metric" -list | where {$ _. -notlike name * _ * '}

2. Command to list all of WMI management profile object in a client operating system machine where these can only active session

Note: .. Replace "session" with the name of the scheduled class

PS> Get-WmiObject -nameSpace "root citrix profiles metric" -Class session

3. Command to list all of WMI management objects profile for a specific session

Note: <> must be replaced with a valid session ID. Replace also "Session" with the name of the scheduled class

Get-WmiObject -nameSpace "root citrix profiles metric" -Class session. | where {$ _. SessionId -eq <>}

4. To list all the WMI object profile management for all sessions

PS C: > = $ classList Get-WmiObject -nameSpace "root citrix profiles metric" -list | or {. $ -notlike Name _ * _ * '} | name select-object

PS C: > foreach ($ class in classList $) {gwmi -nameSpace "root citrix profiles metric" $ class.Name-Class}

5. to list all of WMI object management profile for the current session

PS C: > $ classList = Get-WmiObject -nameSpace "root citrix profiles metric "-list | or {. $ -notlike Name _ * _ * '} | name select-object

PS C: > $ sid = Get-WmiObject -nameSpace "root citrix profiles parameters" Configuration -class | select object SessionId

PS C: > foreach ($ class in classList $) {gwmi -nameSpace "root citrix Profiles metric" -class $ class.Name | where {$ _. SessionId -eq $ sid.SessionId}}

6. To list all the WMI object Profile Management for a specific session on a server machine

Note: <> should be replaced with a valid session ID

PS C: > $ classList = Get-WmiObject -nameSpace - "root citrix profiles metric" -list | or {. $ -notlike Name _ * _ * '} | name select-object

PS C: > foreach ($ class in classList $) {gwmi -nameSpace "root citrix Profiles metric" -class $ class.Name | where {$ _. SessionId -eq <>}}

7. To list all WMI objects in table form

PS C: > $ classList = Get- WmiObject -nameSpace "root citrix profiles metric" -list | or {. $ -notlike Name _ * _ * '} | name select-object

PS C: > foreach ($ class in classList $) {gwmi -nameSpace "root citrix Profiles metric" -class $ class.Name | * -exclude select "_ *" options, ClassPath, Properties, SystemProperties, Qualifiers, site, Container | format-table}

8. To view the list of disk diagnostic information for a specific session

PS C: > $ ProfileSession = Get-WmiObject - nameSpace "root citrix profiles metric" -Class session | where {$ _ eq SessionId <>.}

PS C: > $ ProfileSession.RunHealthChech ()

PS C: > Get-WmiObject -nameSpace "root citrix profiles metrics" Diagnostics-Class | where {$ _ eq SessionId <>.}

Note: "| where {$ _ eq SessionId <>.}" can be ignored in all the above examples for non-server machines where always one session exists.

Previous
Next Post »
0 Komentar