Assign Exchange Online Admin Role Permission using PowerShell

0
22
views

Assign Exchange Online Permissions using PowerShell

You can quickly and easily assign roles to user accounts using Office 365 PowerShell by identifying the user account’s Display Name and the role’s Name.

To start, you first need to establish a session to Office 365 PowerShell, this can be done by a script a created which is published on Microsoft TechNet. Download:

Once the connection to Office 365 PowerShell made, you can move along and determine the current Roles assigned to the user which you want to assign additional permissions.

For the purpose of this post, my user is called Farren and I will first verify which Role groups she is current part of.

First, I will start by running the following cmdlet to connect to Office 365

Once connected I will, run the following cmdlet to get my test user Farren.

Now that I can view my test user in my tenant, let’s move on and list the available Admin Roles which can be assigned to the user.

To get the list of Admin Roles, you can run the following cmdlet.

As you can see there is a few different types of Admin Roles which can be assigned, but for the purpose of the post we are only focusing on Exchange Online Roles.

To continue, I will be assigning the following two Admin Roles to my test user.

  • Exchange Service Administrator
  • Mailbox Administrator

These roles can be assigned by running the following cmdlet.

Before I wrap it up let’s verify if the user Farren is now part of the Exchange Service Administrator Role group. This can be done by running the following cmdlet.

And finally, to assign multiple roles to multiple user, the following csv example can be used with the following cmdlets.

The csv should look like the below.

Now that the cv has been created, let’s look at the script which needs to be run.

Script file and CSV file can be downloaded here.

CSV: O365RoleUpdates

Script: O365RoleUpdateScript

 

#ThatLazyAdmin

Sharing is caring!

Previous articleMicrosoft Exchange Online Multi-Geo Capabilities
Next articleDeploying Sharepoint 2013
About Me ? I Guess i would start by saying i am a family guys and full time SysAdmin and Tech Junky. This Blog is my first attempt to share information about daily issues i come across as a SysAdmin as well as some new deployments i am part of. Topics that i will cover will mostly be about Office 365,Windows,Exchange as well as Active Directory. I hope some of my Blog posts helps someone #LiveLongAndBeLazy #Exchange #Office 365 #ActiveDirectory #Hyper-V
SHARE

LEAVE A REPLY

Please enter your comment!
Please enter your name here