Get-AipServiceTemplateProperty
Gets the properties of a protection template for Azure Information Protection.
Syntax
Get-AipServiceTemplateProperty
-TemplateId <Guid>
[-Names]
[-Descriptions]
[-RightsDefinitions]
[-ContentExpirationOption]
[-ContentExpirationDate]
[-ContentValidityDuration]
[-LicenseValidityDuration]
[-ReadOnly]
[-Status]
[-ScopedIdentities]
[-EnableInLegacyApps]
[<CommonParameters>]
Description
The Get-AipServiceTemplateProperty cmdlet gets specified properties of a protection template for Azure Information Protection, by using the TemplateId parameter.
Similar configuration information can also be viewed in the Azure portal, but this cmdlet also includes the template GUID.
You can query properties of a default template, or a custom template. For more information about custom templates, including how to configure them in the Azure portal, see Configuring and managing templates for Azure Information Protection.
Using the Azure Information Protection unified labeling client?
The Azure Information Protection unified labeling client uses protection templates indirectly. If you have the unified labeling client, we recommend that you use label-based cmdlets instead of modifying your protection templates directly.
For more information, see Create and publish sensitivity labels in the Microsoft 365 documentation.
Examples
Example 1: Get the description and the usage rights for a template
PS C:\>Get-AipServiceTemplateProperty -TemplateId 28168524-29c3-44f1-9e11-ea6c60bb6428 -Descriptions -RightsDefinitions
This command gets the description and the usage rights for all users or groups that are configured for the specified protection template.
Example 2: For all templates, get the name, the usage rights, whether a default template, and whether published or archived
PS C:\>$templates = Get-AipServiceTemplate PS C:\>foreach ($template in $templates) {Get-AipServiceTemplateProperty -TemplateId $template.TemplateId -Name -RightsDefinitions -ReadOnly -Status}
The first command gets all the template IDs and stores them in a variable. The second command then uses this variable to get the template name, the usage rights, whether it is read-only (True for a default template, False for a custom template), and the status (Published or Archived) for each template.
Parameters
-ContentExpirationDate
Lists the date on which content protected with the template expires.
Use this parameter only if ContentExpirationOption is set to OnDate.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ContentExpirationOption
Gets the content expiration configuration setting for content that is protected with the template.
One of the following values is returned:
Never. Indicates that content is available indefinitely.
OnDate. Indicates that content expires at a certain fixed date.
AfterDays. Indicates that content is available for the indicated number of days after it is protected.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ContentValidityDuration
Lists the number of days from the day of protection after which content protected with the template expires.
Use this parameter only if ContentExpirationOption is set to AfterDays.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Descriptions
Lists the descriptions for the template in all locales.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnableInLegacyApps
Indicates the behavior of a departmental template in applications that do not support departmental templates (see the ScopedIdentities parameter).
If set to True and the template is a departmental template, all users trying to protect content from an application that does not support departmental templates will see the template and therefore be able to select it, regardless of whether the users are members of the template's target scope or not.
If set to False, no users see and therefore cannot select the template in applications that do not support departmental templates, even if the users are members of the template's target scope.
This setting has no effect on templates that are not departmental templates and also has no effect on applications that natively support departmental templates.
This parameter is functionally the equivalent of the Show this template to all users when the applications do not support user identity check box when you configure APPLICATION COMPATIBILITY in the Azure classic portal (now retired). There is no equivalent setting in the Azure portal.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LicenseValidityDuration
Lists the number of days content is accessible offline after a license to consume it is acquired.
-1 indicates unlimited access.
0 indicates that a license must be obtained for each use and that content is only available online.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Names
Lists the names for the template in all locales.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ReadOnly
Indicates whether the template is a default template (True) and therefore cannot be edited or deleted, or a custom template (False) and therefore can be edited or deleted by an administrator.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RightsDefinitions
Lists the rights granted to users or groups for the content that is protected with the template.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ScopedIdentities
Lists the users by email address (account or group) that can see and therefore select departmental templates from applications.
For the specified users to see the templates, the application must support departmental templates or the EnableInLegacyApps parameter must be set to True.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Status
The status of the template:
-Archived templates are available to consume previously protected content but are not displayed to users.
-Published templates are available to users to protect content.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TemplateId
Specifies the GUID of a protection template.
You can use the Get-AipServiceTemplate cmdlet to obtain the template ID of all templates.
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |