Fix-MissingRMSTemplates

  • 29 September 2023
  • Sean Huggans
Description: 

The following was given to me by Microsoft Support to resolve an issue where RMS Templates were missing when trying to set up an encryption mailflow rule. This tenant recently upgraded from only having o365 business standard licenses present to having o365 Business Premium.

In this case, I was also receiving the following error when trying to resolve via PowerShell on my own:
"The term 'Import-RMSTrustedPublishingDomain' is not recognized as the name of a cmdlet, function, script file, or operable program"

After running the below, the templates showed up about 5 minutes later.

Usage Type: 
Standalone
Script Source: 
# Resolve Missing RMS Templates and The term 'Import-RMSTrustedPublishingDomain' is not recognized as the name of a cmdlet, function, script file, or operable program issue
 
Install-Module -Name AIPService
Set-ExecutionPolicy Unrestricted
Connect-ExchangeOnline
Connect-AIPService
 
#Activate the service
Enable-AIPService
 
#Get the configuration information needed for message protection.
$rmsConfig = Get-AipServiceConfiguration
$licenseUri = $rmsConfig.LicensingIntranetDistributionPointUrl
 
#Collect IRM configuration for Office 365
$irmConfig = Get-IRMConfiguration
$list = $irmConfig.LicensingLocation
if (!$list) { $list = @() }
if (!$list.Contains($licenseUri)) { $list += $licenseUri }
 
#Enable message protection for Office 365
Set-IRMConfiguration -LicensingLocation $list
Set-IRMConfiguration -AzureRMSLicensingEnabled $True -InternalLicensingEnabled $true
 
#Enable new Protect button in Outlook on the Web
Set-IRMConfiguration -SimplifiedClientAccessEnabled $true
Test-IRMConfiguration -Sender thomas.adam@visuafusion.com
Note: that all applications posted here are posted for use, both commercial and non-commercial, free of charge, and as such are provided as-is, without warranty of any kind whatsoever. visuaFUSION, FMSCUG or any other program listed here's author are not responsible for any damages or shortcomings that result from usage of any of these applications.
Error | visuaFUSION Systems Solutions Blog

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /mnt/home/visuafus/public_html/bahusa.net/includes/common.inc:2861) in drupal_send_headers() (line 1551 of /mnt/home/visuafus/public_html/bahusa.net/includes/bootstrap.inc).
  • Error: Call to undefined function mail() in DefaultMailSystem->mail() (line 79 of /mnt/home/visuafus/public_html/bahusa.net/modules/system/system.mail.inc).

Error

The website encountered an unexpected error. Please try again later.