Activate and deactivate multiple Azure PIM roles using PowerShell

This post is about the PIM PowerShell Function which I developed to make things easy for me to activate the roles quickly using PowerShell, I will walk you through how to utilize this Function.

Requirements: 

Usage: Import the cmd to the PowerShell session, using the CMD below.


Now run the CMD: "GetActivePIMRoles"

Supply the credentials


after that, the screen will prompt, select the roles you wish to activate and hit "ok", you can select multiple roles at the same time.


Next prompt will ask to select for the number of hours role to be activated.


Next, the role activation process will be activating each role one by one.
Apart from the activation, Once the work is finished, we can deactivate the role quickly repeating the same steps, Just Select the role to deactivate and click on OK, all the selected role will be deactivated.

This completes my post on how to use my 'GetActivePIMRoles' PowerShell function, feel free to leave your comments and suggestions.


Comments