How to configure Azure AD PIM via PowerShell step by step?

How to configure Azure AD PIM via PowerShell step by step?


#How to install Azure AD PIM

Install-Module -Name Microsoft.Azure.ActiveDirectory.PIM.PSModule

# How to get command

Get-Command -Module Microsoft.Azure.ActiveDirectory.PIM.PSModule

# How to check PIM Service connection


# How to check already defined assigement for that User


# Define valibale based on PIM role

$roleAssignment = Get-PrivilegedRoleAssignment | Where {$_.RoleName -eq “Privileged Role Administrator”}

# Enable role assigement for sharepoint admin

Enable-PrivilegedRoleAssignment –Duration 1 –RoleAssignment $roleAssignment –Reason “Add SPOadmin to SPO Administrators”

# Check role assigment


# How to disbale disabled assigment

Disable-PrivilegedRoleAssignment –RoleAssignment $roleAssignment

# Disconnect Powershell


Recent Articles

How to configure restriction for Users from creation of Office 365 groups, Plans & Microsoft teams.

Connect-AzureAD Create new Security Group "AllowedtoCreateGroups" Get-AzureADGroup -SearchString "AllowedtoCreateGroups" $GroupName = "<SecurityGroupName>" $AllowGroupCreation = "False" Connect-AzureAD $settingsObjectID = (Get-AzureADDirectorySetting | Where-object -Property Displayname -Value "Group.Unified" -EQ).id if(!$settingsObjectID) { $template = Get-AzureADDirectorySettingTemplate | Where-object...

Attack Simulator for Office 365

Microsoft has released Attack Simulator (currently in Preview) to allow Office 365 Global Administrators to simulate phishing campaigns and other attack simulations. Prerequisites ·       Your organization’s email...

What is Advanced Threat Analytics?

Advanced Threat Analytics (ATA) is an on-premises platform that helps protect your enterprise from multiple types of advanced targeted cyber-attacks and insider threats. How ATA...

How to remove Office 365 Groups permanently ?

  Hi Guys, Here is process how to remove office 365 groups or soft deleted groups from your office 365 tenant. Step-1 you need to connect with Azure...

How to solve the issue of guest users access in Office 365 when you applied restriction on office 365 groups creation tenant wide?

Connect-AzureAD via powerShell Run the following command: $template = Get-AzureADDirectorySettingTemplate | ? {$_.displayname -eq "group.unified"} See if you already have an AzureADDirectorySetting object,...

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here

Stay on op - Ge the daily news in your inbox