Before we start with any PowerShell scripting for SharePoint online it needs to be ensured that SharePoint Online Management Shell is installed. If not we can download and install SharePoint Online Management Shell from here.
System requirements:
System requirements:
- Supported Operating System: Windows 10 , Windows 7 Service Pack 1, Windows 8, Windows Server 2008 R2 SP1, Windows Server 2008 Service Pack 2, Windows Server 2012, Windows Server 2016
- PowerShell 3.0 installed.
Now go "Start" menu and search for "SharePoint Online Management Shell" and open it.
- Type below command replacing the url with your SharePoint admin center url. Please note word -admin in the url, you can place it by typing or copy the url directly from browser by navigating to SharePoint admin center. To know how to navigate to SharePoint admin center you can check here.
Connect-SPOService -Url https://companyname-admin.sharepoint.com
After hitting enter it will ask for credentials. Provide the credentials and click OK. This user
must be a member of the tenant’s Global Admin or SharePoint Administrator role.
- Then type below command by placing correct value for parameters -Title, -Template, -TimeZoneId and hit enter.
New-SPOSite -Url "https://companyname.sharepoint.com/sites/mydailysp" -Owner
"administrator@companyname.onmicrosoft.com" -Title "My Daily SharePoint PS" -Template
"STS#0" -TimeZoneId 23
STS#0 is template name for team site. For other templates title and name are listed here.
TimeZoneId 23 is for UTC+5:30 Indian time. For other SharePoint online TimeZoneId you
Once execution successfully completed, site collection would be listed in the SharePoint admin center and here you go. Cheers !!!
No comments:
Post a Comment