Configuring and managing templates for Azure Information Protection
https://docs.microsoft.com/en-us/azure/information-protection/configure-policy-templates
Open windows PowerShell and run below commands.
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session -DisableNameChecking
Install-Module -Name AADRM
Connect-aadrmservice
To Create RMS templates, copy below lines and paste on PowerShell:
$names = @{}
$names[1033] = "Test"
$descriptions = @{}
$descriptions[1033] = "Test description"
$r1 = New-AadrmRightsDefinition -EmailAddress rahuls@gc-solutions.net -Rights "VIEW","EXPORT"
Add-AadrmTemplate -Names $names -Descriptions $Descriptions -LicenseValidityDuration 5 -RightsDefinitions $r1 -ScopedIdentities engineering@contoso.com -Status Published
To Check RMS Templates:
Get-AadrmTemplate
Test-IRMConfiguration –sender rahuls@gc-solutions.net
To Remove Templates:
Remove-AadrmTemplate -TemplateId 36546649-4944-4462-a409-74373a67b6dd
Get-IRMConfiguration