Creating a SharePoint site collection
Creating a new SharePoint site collection is a basic SharePoint administration task. This recipe covers how to complete that task with a few lines of PowerShell.
Getting ready
Using the skills learned in the Setting up the PowerShell environment recipe from Chapter 1, Office 365 Setup and Basic Administration and the Connecting via PowerShell to SharePoint Online recipe in this chapter, connect to your Office 365 tenant via PowerShell.
How to do it…
- Update the
URL
,Owner
, andTitle
parameters as appropriate, then run the following code snippet:New-SPOSite -Url https://natechamberlain.sharepoint.com/sites/PowerShell -Owner [email protected] -StorageQuota 1000 -Title "PowerShell Site"
- The site will be generated, but this can take some time. Wait until the PowerShell console has completed the task.
- To verify that the site has been created, use the
Get-SPOSite
cmdlet learned in the previous recipe...