Refreshing templates and testing Azure RMS

If you are using Microsoft Azure RMS service together with Office365, in order to extend functionality of basic RMS in Office365, you probably do it to create customized RMS templates. If you activate Office365 Rights Management, it will let you use only two default templates for content protection, and one template for email protection (Do Not Forward). Some users might be fine with these capabilities, but if you want more like on-premise RMS features, you’ll probably want Azure RMS. When you enable Azure RMS with your Office 365 subscription, it will let you create custom templates for RMS. However, if you are like me, and like to play around and make changes frequently, you might want check to speed up Azure custom RMS templates sync to Office365. Also, it might be useful to check and test your Azure RMS configuration from time to time. Luckily, there are few nice Powershell cmdlets that can be used for this purpose.

First, you need to connect to your Office365 tenant. To first store your credentials in PS variable, issue this cmdlet:

$cred = Get-Credential and press Enter. After this you will be prompted to enter your Office365 admin credentials. When you do it, type this:

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $cred -Authentication Basic –AllowRedirection, and press Enter. This will create a session to your Office365 tenant and also store in in Session variable.

Next, you want to import your session, and you will do it by executing Import-PSSession $Session cmdlet.

To check your RMS configuration, just execute Get-IRMConfiguration cmdlet after you imported a session in previous step. Check if internal and external licensing are enabled and also check for the RMSOnlineKeySharingLocation ( for Europe , it should be: https://sp-rms.eu.aadrm.com/TenantManagement/ServicePartner.svc). Besides this, it is useful to test your RMS configuration by executing Test-IRMConfiguration –RMSOnline cmdlet.

If all test are passed, and you want to force sync of your new/changed/deleted templates from Azure RMS to Exchange Online, here is the cmdlet :

Import-RMSTrustedPublishingDomain -Name "RMS Online – 1" -RefreshTemplates -RMSOnline

Make sure that the name of RMSTrustedPublishingDomain is accurate (if you used default values it will be like in example above).

Leave a Reply