There are a number of reasons why you may want to make your self an owner of all distribution groups in Office 365. One is that you are an IT Administrator of the organisation in question and wish to moderate the distribution groups in the Exchange Online GUI/PowerShell without running in to permission problems.
- First make sure you have the remote signed execution policy set to true. You can do this by running PowerShell in admin mode and running: Set-ExecutionPolicy RemoteSigned
- Next, run the following making sure you fill in your e-mail address in the space provided:
$LiveCred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange-ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
Get-DistributionGroup |Set-DistributionGroup -ManagedBy “[email protected]” –BypassSecurityGroupManagerCheck