Installing the AADRM PowerShell module
Use the following information to help you install the Windows PowerShell module for the Azure Rights Management service from Azure Information Protection. The name of this module is AADRM.
You can use this PowerShell module to administer the Azure Rights Management service from the command line by using any computer that has an Internet connection and that meets the prerequisites listed in the next section. Windows PowerShell for Azure Rights Management supports scripting for automation or might be necessary for advanced configuration scenarios. For more information about the administration tasks and configurations that the module supports, see Administering Azure Rights Management by Using Windows PowerShell.
This table lists the prerequisites to install and use the AADRM PowerShell module for the Azure Rights Management service from Azure Information Protection.
|Minimum version of Windows PowerShell: 3.0||You can confirm the version of Windows PowerShell that you are running by typing
If you need to install a later version of Windows PowerShell, see Upgrading existing Windows PowerShell.
|Minimum version of the Microsoft .NET Framework: 4.5
Note: This version of the Microsoft .NET Framework is included with the later operating systems, so you should need to manually install it only if your client operating system is less than Windows 8.0 or your server operating system is less than Windows Server 2012.
|If the minimum version of the Microsoft .NET Framework is not already installed, you can download Microsoft .NET Framework 4.5.
This minimum version of the Microsoft .NET Framework is required for some of the classes that the AADRM module uses.
Starting with version 220.127.116.11 of the AADRM module, the Microsoft Online Services Sign-In Assistant is no longer required.
If you installed a version of the AADRM module with the Azure Rights Management Administration Tool, use Programs and Features to uninstall Windows Azure AD Rights Management Administration before you install the latest version of the AADRM module from the PowerShell Gallery.
How to install the AADRM module
The AADRM module has moved to the PowerShell Gallery and is no longer available from the Microsoft Download Center.
To install the AADRM module from the PowerShell Gallery
If you're new to the PowerShell Gallery, see Get Started with the PowerShell Gallery. Follow the instructions for the gallery requirements, which include installing the PowerShellGet module and the NuGet provider.
To see details about the AADRM module on the PowerShell Gallery, visit the AADRM page.
To install the AADRM module, start a PowerShell session with the Run as Administrator option, and type:
Install-Module -Name AADRM
If you are warned about installing from an untrusted repository, you can press Y to confirm. Or, press N and configure the PowerShell Gallery as a trusted repository by using the command
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted and then rerun the command to install the AADRM module.
If you have a previous version of the AADRM module installed from the Gallery, update it to the latest by typing:
Update-Module -Name AADRM
In a Windows PowerShell session, confirm the version of the installed module. This check is particularly important if you upgraded from an older version:
(Get-Module AADRM –ListAvailable).Version
Note: If this command fails, first run Import-Module AADRM.
To see which cmdlets are available, type the following:
Get-Command -Module AADRM
Get-Help <cmdlet_name> command to see the Help for a specific cmdlet, and use the -online parameter to see the latest help on the Microsoft documentation site. For example:
Get-Help Connect-AadrmService -online
For more information:
Full list of cmdlets available: AADRM Module
List of main configuration scenarios that support PowerShell: Administering Azure Rights Management by Using Windows PowerShell
Before you can run any commands that configure the Azure Rights Management service, you must connect to the service by using the Connect-AadrmService cmdlet. When you have finished running your configuration commands, as a best practice, disconnect from the service by using the Disconnect-AadrmService cmdlet. If you do not disconnect, the connection is automatically disconnected after a period of inactivity. Because of the automatic disconnection behavior, you might find that you need to occasionally reconnect in a PowerShell session.
If the Azure Rights Management service is not yet activated, you can do this after you have connected to the service, by using the Enable-Aadrm cmdlet.
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.