Connecting to SharePoint Online using PowerShell

PowerShell allows one to perform bulk operations in a short period of time. It is much faster than doing the same operations over a GUI. In SharePoint Online if one needs to manage Site Collections, they would need to log into the SharePoint Online Admin Center. If one has to use Power Shell in SharePoint Online, they would need to download the SharePoint Online Management Shell. Here are the steps on how to connect to SharePoint Online and perform operations using Power Shell.

 

Steps

  1. Download the SharePoint Online Management ShellScreenshot (112).png
  2. On the Start Menu, type sharepoint.
  3. Click on the App, SharePoint Online Management Shell
  4. Then enter the following commands.
$adminUPN="<the full email address of a SharePoint Online global administrator
 account, example: jdoe@contosotoycompany.onmicrosoft.com>"
$orgName="<name of your Office 365 organization, example: contosotoycompany>"
$userCredential = Get-Credential -UserName $adminUPN -Message "Type the password."
Connect-SPOService -Url https://$orgName-admin.sharepoint.com -Credential 
$userCredential



Advertisements

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