Set User as Site collection Administrator in SharePoint Online (Office 365)

Requirement:

This is another short blog on SharePoint Online .As I said previously, I just want to share my training experience on SharePoint 2013 and SharePoint Online. The following figure shown a list of site collection administrators of a site collection. In this blog, I will show, how to add new site collection administrator in SharePoint online using PowerShell.



Syntax:

  • Connect to SharePoint Online by using the following PowerShell command. It takes the URL of our tenant admin and a username. Then it will ask for password.
    1. Connect-SPOService -Url https://moharanakirti-admin.sharepoint.com [email protected]  
  • Set “Kirti Moharana” as a site administrator of the provided site,
    1. Set-SPOUser -Site https://moharanakirti.sharepoint.com/sites/kirti [email protected] -IsSiteCollectionAdmin $true  

Output:

After running the above cmdlets, we will see the new user is added as a site collection administrator as shown in following figures.