PowerShell for for #Office365 #SharePoint Online Administration

First things first, we need to be SharePoint Online Administrators to be able to manage the site collections in our Office 365 tenant using both SharePoint Online Admin Center as well as SharePoint Online Management Shell.

This blog is about the ABCs of connecting to SharePoint Online Management Shell so you can start administering your sites without having to go through GUI. Personally, I like this quite a bit and pretty excitedly PowerShelling(It really doesn’t take much to get me excited, but thats beside the point…so, powerhsell)

To connect to your SharePoint online service using SharePoint Online management shell follow the steps

Start > SharePoint Online Management Shell (PS C:\Windows\system32>)
Connect-SPOService https://wspdc-admin.sharepoint.com

Script to create new site collection:
New-SPOSite -Url https://wspdc.sharepoint.com/sites/PowerShell
-Owner swetha@wspdc.onmicrosoft.com
-StorageQuota 500 (quota for all the sites in this collection)
-CompatibilityLevel 15 (SharePoint 2013)
-LocaleID 1033
-ResourceQuota 100
-Template “STS#0” (team site template)
-TimeZoneId 13 (pacific timezone code)
-Title “Shell Site”

This creates a new team site collection with title “Shell Site” with all the default settings in it.

Get-SPOSite https://wspdc.sharepoint.com/sites/PowerShell you can see that your new site collection is ready with the requested owner and storage quota

ps1

Get-SPOSite https://wspdc.sharepoint.com/sites/PowerShell | fl shows the properties formatted as list as seen below

ps2

 

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