Get All Site Administrators and Owners With Full Control – SharePoint Online PowerShell

A commonly posed question within an organisation that use SharePoint Online is "Can I get a list of all the site administrators?". A perfectly reasonable question, I am sure you will agree. Regardless of whether your role is a SharePoint Administrator, Office 365 Administrator or even a PowerShell Developer, you will spot there is more to this request than meets the eye. You will no doubt start googling looking for scripts that get all SharePoint Administrators or all SharePoint Site Owners. Why re-invent the wheel after all.

Google SharePoint Administrators PowerShell

I found several scripts and blog posts that mostly met my needs. I did feel the need to start from the ground up so this is what I am sharing with you in this post.

Site Administrators or Members with Full Control?

Most administrators will find themselves looking initially at Get-PnPSiteCollectionAdmin, which is an admirable starting point.

Read More

PowerShell SharePoint: Installing SharePoint Online Management Shell

Once upon a time there was a need to download an MSI and to install the SharePoint PowerShell Module that way, however, as all useful and trusted modules do one day it now can be found in the PowerShell Gallery at this linkMicrosoft.Online.SharePoint.PowerShell. If you were still to need it for some reason it can be located here. But don't bother doing that, have a read below and get started using SharePoint Online Management Shell.

So, to install the module, run PowerShell as administrator and type …

Install-Module -Name Microsoft.Online.SharePoint.PowerShell

Then to bring it in to use by sending this command …

Import-Module -Name Microsoft.Online.SharePoint.PowerShell

Now we have the module, installed and imported to the session let's connect …

Read More