Creating a SharePoint site is a powerful way to collaborate, organize content, and enhance productivity within your organization. In this blog, we’ll walk through the process of setting up a SharePoint site.
Blog Series
- Part 1 – Getting Started with SharePoint Online
- Part 2 – Set up PowerShell for SharePoint Online Administration
- Part 3 – Create and Remove SharePoint Sites
- Part 4 – Configure Storage Limits on SharePoint Sites
- Part 5 – Configure External Sharing for SharePoint and OneDrive for Business
- Part 6 – Enable File Requests in SharePoint Online and OneDrive for Business
- Part 7 – Managed Metadata with SharePoint Term Store
Create a Team/Communication SharePoint Site
- Sign in to the SharePoint Online portal (https://yourdomain.sharepoint.com) using your Microsoft 365 (formerly Office 365) credentials.
- Once signed in, you’ll typically land on the SharePoint landing page. If not, navigate to the “SharePoint” app from the app launcher.
- Under Sites -> Active sites, click on “Create site” to initiate the site creation process.
- Choose a site template
- Click on ‘Browse more sites‘ to get access to more templates, enter the Site name, Description, Site address, and the Primary Administrator. Click Next
- Select the language, and time zone and enter the storage limit. Click on ‘Create site‘
- Once the site is created, it will populate under the Active Sites list.
- After the site is created, you can redirect to the newly created site and start adding content, customizing the site layout, inviting members, and managing permissions. Permissions and storage can still be managed from the Admin Center.
SharePoint Site Creation via PowerShell
Site creation using New-SPOSite cmdlet
- Team Site
New-SPOSite
-Url https://grandvm02.sharepoint.com/sites/TeamSite1
-Title "Team Site1"
-Owner TrainingLab2402@grandvm02.onmicrosoft.com
-StorageQuota 5000
-Template STS#3
- Communication Site
New-SPOSite
-Url https://grandvm02.sharepoint.com/sites/CommunicationSite1
-Title "Communication Site1"
-Owner TrainingLab2402@grandvm02.onmicrosoft.com
-StorageQuota 5000
-Template SITEPAGEPUBLISHING#0
Site creations using New-PnPSite cmdlet
- Team Site
The below command will generate a standalone Team site titled ‘Team Site2’ which will not be linked to a Microsoft 365 group. The admin initiating the site creation will assume ownership. Additionally, a designated custom site design will be applied to the site.
New-PnPSite -Type TeamSiteWithoutMicrosoft365Group -Title 'Team Site2' -Url https://grandvm02.sharepoint.com/sites/TeamSite2
- Team Site -> linked with Microsoft 365 Group
New-PnPSite gives you the option to create Team site with Microsoft 365 group. The command below will establish a Team Site named ‘Teams group 1’, with the URL set to ‘https://grandvm02.sharepoint.com/sites/teams-group1’. The Microsoft 365 Group will be assign ‘Group1’ as its alias.
New-PnPSite -Type TeamSite -Title "Teams group 1" -Alias Group1 -SiteAlias teams-group1
- Communication Site
This command will generate a fresh Communication Site titled ‘Communication Site2’.
New-PnPSite -Type CommunicationSite -Title "Communication Site2" -Url https://grandvm02.sharepoint.com/sites/CommunicationSite2
Add users to Sites
To manage Site Admins, Site Owners, and Site Members in SharePoint Online using PowerShell, you can use the following cmdlets:
- Adding Site Admins:
Set-SPOUser -Site https://grandvm02.sharepoint.com/sites/Site1 -LoginName amy.anderson@grandvm02.onmicrosoft.com -IsSiteCollectionAdmin $true
- Adding Site Owners:
Add-SPOUser -Group "Site1 Members" -LoginName Stephen.Salvatore@grandvm02.onmicrosoft.com -Site https://grandvm02.sharepoint.com/sites/Site1
- Adding Site Members:
Add-SPOUser -Group "Site1 Owners" -LoginName Stephen.Salvatore@grandvm02.onmicrosoft.com -Site https://grandvm02.sharepoint.com/sites/Site1
Delete/Remove Sharepoint Sites
- You can delete the Site straight from the SharePoint Site Settings by going to ‘Site Information‘.
- Under Site information, choose ‘Delete site‘.
You will get the following prompt “You are about to delete the ‘Sample Team Site1’ site. This will delete all SharePoint content on the site. Please backup any files or other content before proceeding. Do you want to continue?“
Check the box “Yes, delete this site and its associated content.” and click on Delete.
- You can also delete the Site from the SharePoint Admin Center.
- Deleted SharePoint sites will be retained for 93 days until permanently deleted. You can choose to restore or permanently delete the site from the ‘Deleted site‘ page if needed within this period.
To delete using PowerShell
Use the Remove-SPOSite
cmdlet to remove a SharePoint Site(you can set the parameter confirm to $false to suppress the confirmation prompt when removing the specified SharePoint site. -> confirm:$false
)
Remove-SPOSite -Identity https://grandvm02.sharepoint.com/sites/TeamSite1
- The site that has been deleted will appear in the Deleted Sites list, showing the ‘Days remaining’ until it gets permanently deleted automatically.
Get-SPODeletedSite
However, it’s worth noting that during this period, we still have the option to restore the site if needed.
Restore-SPODeletedSite https://grandvm02.sharepoint.com/sites/TeamSite1
Use the Remove-SPODeletedSite
cmdlet to remove the site from the deleted list.
Remove-SPODeletedSite -Identity https://grandvm02.sharepoint.com/sites/TeamSite1