O365 Global Admin has no access to recent SharePoint Online site collections

Iron Contributor

Is there a way to add the Company Administrator as the primary site collection administrator for all site collections using PowerShell?

3 Replies

You can use the PnP PowerShell commandlets to do so. A nice example of what you want to achieve can be found at:

 

http://thvo.me/2mJ2wNI

 

More information about these commandlets can be found at:

 

https://msdn.microsoft.com/en-us/pnp_powershell/pnp-powershell-overview

And you can also use just standard Set-SPOSite cmdlet to do this

I tried the set-sposite command but it requires an actual email id for owner tag, I cannot put "Company Administrator" in there as the user doesnt exist.