PIM Activate and deactivate privileged roles in office 365 using powershell Requirements: Install PIM Module Install-Module -Name Microsoft.Azure.ActiveDirectory.PIM.PSModule Import the script as module: Install-Module D:\scripts\GetActivePIMRoles.ps1 Run the CMD GetActivePIMRoles Select the available roles and hit ok.