web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

{Do you know} Remove bulk system administrator from Power Platform using Powershell Script.

malla Profile Picture malla
Hello Everyone,



Today i am going to show how to remove bulk system administrators or any specific role using PowerShell Script.




Let's get's started.



New Microsoft Release feature details: Enables you to have better control over security in Dataverse environments. You can easily produce a list of users assigned to the system administrator role and remove assignments as needed.




Suppose your organisation have a lot of system administrators and global admins or power platform admins can run this Powershell scripts to remove bulk system administrators.


How do you do that ?


You will following list to run the script.


1. Install Visual Studio 2017 or higher

2. Install the .NET Framework 4.6.2 Developer Pack

3. Open the solution file (Microsoft.PowerPlatform.Administration.Powershell.sln) in administrator mode and build the solution.

4. Open PowerShell in administrator mode.

5. Set Execution Policy to Unrestricted.

6. Import the Microsoft.PowerPlatform.Administration.PowerShell module, as shown below.

  1. cd Microsoft.PowerPlatform.Administration.Powershell
    Import-Module .\Microsoft.PowerPlatform.Administration.UserManagement.psm1



7. Run the command of your choice from the following Powershell commands, click here.


8. Each command will prompt the user to provide credentials when connecting to Dataverse.
Enter a user principla name and password.


Powershell commands.

1. Generate reports of role assignments
2. Remove role assignments from given list of users.
3. Add role assignments for a given list of users.

This was originally posted here.

Comments

*This post is locked for comments