How to Change owner of Security Group in Office 365 via PowerShell

I have an security group (Cloud_Sec) and I will change its owner via PowerShell.

First step is to log in to Exchange Online PowerShell

Second is to get Security group information to make sure it is good,

Get-DistributionGroup -identity “Cloud_Sec”

last command I type is to set a new manager

Set-DistributionGroup -Identity “Cloud_Sec” -ManagedBy “ben@cloudtolearn.com” -BypassSecurityGroupManagerCheck

Let’s check it from GUI

Reminder: If you don’t type “-BypassSecurityGroupManagerCheck”, you will get error message.

Any question, please let us know

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: