Request a 60-minute free consultation

Creating a SPO Site

Here's a PowerShell script to create a SharePoint Online (SPO) site using the SharePoint Online Management Shell module. Before running this script, make sure you have installed the SharePoint Online Management Shell module and connected to your SharePoint Online environment using the Connect-SPOService cmdlet. You'll also need appropriate permissions to create sites.

        
            # Define the SharePoint Online admin URL and the site information
            $adminURL = "https://yourtenant-admin.sharepoint.com"
            $siteTitle = "New Site Title"
            $siteUrl = "https://yourtenant.sharepoint.com/sites/NewSite"
            $siteTemplate = "STS#0" # You can change this to the desired site template

            # Connect to SharePoint Online
            Connect-SPOService -Url $adminURL

            # Create a new SharePoint Online site
            New-SPOSite -Title $siteTitle -Url $siteUrl -Template $siteTemplate

            # Disconnect from SharePoint Online
            Disconnect-SPOService
        
    

Instructions:

Replace the following placeholders in the script with your specific information:

  • https://yourtenant-admin.sharepoint.com: Replace with the URL of your SharePoint Online admin center.
  • "New Site Title": Replace with the desired title for your new site.
  • https://yourtenant.sharepoint.com/sites/NewSite: Replace with the desired URL for your new site.
  • "STS#0": Replace with the desired site template. You can find available templates in your SharePoint Online environment.

Other solutions

Connect with HarjGroup

Contact Us
Find out how HarjGroup's expertise can help you and your company.