Share via


Viewing a Summary of User Rights for a Rights Policy Template

Updated: December 23, 2011

Applies To: Windows Server 2008 R2, Windows Server 2008 R2 with SP1

The summary of user rights lets you review the rights granted to users and groups by a specific template.

Membership in the local AD RMS Template Administrators, or equivalent, is the minimum required to complete this procedure.

To view a summary of user rights for a rights policy template

  1. At the Windows PowerShell command prompt, type:

    Get-ChildItem -Path <drive>:\RightsPolicyTemplate

    where <drive> is the name of the Windows PowerShell drive. Note the ID of the rights policy template that you want to view.

  2. Get-ChildItem -Path <drive>:\RightsPolicyTemplate\<template_ID>\UserRight

    where <drive> is the name of the Windows PowerShell drive, and <template_ID> is the ID of the template you found in the preceding step.

Tip

Rather than typing out the entire rights policy template ID on the command line, you can type the first few characters and then press the TAB key. Windows PowerShell will then complete the ID for you.

Handling type differentiation when working with rights policy templates

Because Windows PowerShell variables are "loosely typed" (i.e. they are not limited to a particular type of object) it’s worth pointing out that the base type returned when reading rights policy template data can differ depending on the number of templates that are configured on a cluster.

For example, if only a single rights policy template is configured, the base type will be an AD RMS full container as shown in the following example:

PS AdrmsCluster:\RightsPolicyTemplate> Get-ChildItem -path .


   Hive: AdRmsAdmin::AdrmsCluster:\RightsPolicyTemplate

Id                                       DefaultDisplayName   CreatedDa LastModif LastModi Property
                                                              te        iedDate   fiedBy
--                                       ------------------   --------- --------- -------- --------
cdf8b4b1-cd18-46f0-ac53-242451b272bf     Test1                3/18/2... 3/18/2... RMSFS... {IsDi...


PS AdrmsCluster:\RightsPolicyTemplate> $var = Get-ChildItem -path .
PS AdrmsCluster:\RightsPolicyTemplate>  $var.GetType()

IsPublic IsSerial Name                         BaseType
-------- -------- ----                         --------
False    False    RightsTemplateItemContainer  Microsoft.RightsManagementServices.PowerShell.FullContainer

If more than a single rights policy template is configured, however, Windows PowerShell selects a .NET object base type of System.Array instead such as is shown in the following example:

PS AdrmsCluster:\RightsPolicyTemplate> Get-ChildItem -path .


   Hive: AdRmsAdmin::AdrmsCluster:\RightsPolicyTemplate

Id                                       DefaultDisplayName  CreatedDa LastModif LastModi Property
                                                             te        iedDate   fiedBy
--                                       ------------------  --------- --------- -------- --------
9fa53dee-4382-4ba1-a083-5d6c7759b3b7     Test2               3/18/2... 3/18/2... RMSFS... {IsDi...
cdf8b4b1-cd18-46f0-ac53-242451b272bf     Test1               3/18/2... 3/18/2... RMSFS... {IsDi...


PS AdrmsCluster:\RightsPolicyTemplate> $var = Get-ChildItem -path .
PS AdrmsCluster:\RightsPolicyTemplate> $var.GetType()

IsPublic IsSerial Name          BaseType
-------- -------- ----          --------
True     True     Object[]      System.Array

Therefore, when writing PowerShell scripts to view and summarize rights policy template data you might need to include additional script code to test for the base type in order to determine how best to format and display template data as output.

See Also

Concepts

Using Windows PowerShell to Administer AD RMS
Understanding the AD RMS Administration Provider Namespace
Configuring Rights Policy Templates

Other Resources

Understanding Rights Policy Templates
Understanding Rights Enforcement