Create a Communication Site in SharePoint Online using PowerShell

Requirement: Create a communication site in SharePoint Online using PowerShell

How to create a Communication Site in SharePoint Online?

One of the recent addition to the Microsoft SharePoint Online space is Communication sites! While the modern team sites are used for departments/teams to collaborate, The SharePoint Online communication site templates are designed to broadcast information to a broader audience, such as to an entire organization to keep them informed and engaged. You can share news, reports, images, documents, organizational events, and other information in a visually compelling format that communicates key information in one central place. A communication site is a more visual-centric, dynamic site that looks great on the web, on a PC or Mac, on mobile browsers, and in the SharePoint app. Communication sites allow people to create and share timely updates that go beyond email. Anyone can easily create communication sites and customize them within 30 minutes!

Communication sites provide configurable templates for the sites and pages to make your life easy while communicating messages to a large audience, ideal for the root site as Intranet. When you create a communication site in SharePoint, you can start with a blank site or choose one of the available site designs, each of which comes with a default set of web parts with preset designs to help users get started faster.

Create a New Communication Site in SharePoint Online

To create a communication site in SharePoint Online, follow these steps:

  • Login to SharePoint Admin Center as a tenant admin or SharePoint Online Administrator via the web browser. 
  • Click on “Sites” >> “Active Sites” from left navigation >> Click on “Create” >> From the options available, choose “Communication Site” to create a new communication site collection.
    create communication site sharepoint online powershell
  • Enter the site name, which becomes the site address. You can edit the Site URL if needed. These sites are created under the /sites managed path by default.
  • Select a template for your site – it is just a starting layout; you can change it later anyway. I’ve selected “Topic” here! how to create communication site in sharepoint online
  • Optionally, under the “Advanced settings”, select the language and set the description by adding some text that lets people know the purpose of your site, and then click on the Finish button.

SharePoint creates the communication site quickly and will appear on the sites list. Now, we can populate it with our own information. When ready, You can share it with others by adding the permissions and sharing it with others. Communication sites don’t come with an Office 365 group. 

create new communication site sharepoint online

You can also use the “SharePoint Home Page” (https://tenant.sharepoint.com/_layouts/15/sharepoint.aspx) to create modern communication sites by simply going to Office 365 App Launcher click on SharePoint.

create modern communication site sharepoint

Here is where communication site templates fit perfectly:

  • A typical Intranet-Extranet-department site,
  • News Portals, Product or Service oriented sites,
  • Campaigns, insights, Events, business highlights, and reviews

Alright, let’s create a communication site in SharePoint Online with PowerShell!

Create a SharePoint Online communication site with PowerShell

To create a communication site in SharePoint Online using PowerShell script, specify the site template ID as “SITEPAGEPUBLISHING#0” for the New-SPOSite cmdlet.

#Define Parameters
$AdminCenterURL = "https://crescent-admin.sharepoint.com/"
$SiteURL = "https://crescent.sharepoint.com/sites/communications"
$SiteTitle = "Communication Site"
$SiteOwner = "[email protected]"

#Connect to SharePoint Online
Connect-SPOService -Url $AdminCenterURL -Credential (Get-Credential)

#PowerShell to Create new communication site
New-SPOSite -Url $SiteURL -Owner $SiteOwner -Template "SITEPAGEPUBLISHING#0" -StorageQuota 2048 -Title $SiteTitle

Run this script with SharePoint Online Management Shell. Let’s add some error handling to the above script and re-write it in PnP PowerShell.

Create a Communication site in SharePoint Online using PnP PowerShell

Here is how to create a communication SharePoint site using the PnP PowerShell command:

New-PnPSite -Type CommunicationSite -Title Intranet -Url https://crescent.sharepoint.com/sites/Intranet -SiteDesign Showcase

And a bit expanded one goes here:

#Define Config Variables
$AdminCenterURL = "https://crescent-Admin.sharepoint.com"
$SiteURL = "https://crescent.sharepoint.com/sites/intranet"
$SiteTitle = "Crescent Intranet Portal"
$SiteOwner = "[email protected]"
$Template = "SITEPAGEPUBLISHING#0" #Communication Site template
$Timezone = 24 #(GMT+04:00) Abu Dhabi, Muscat

#Get Credentials to connect
$Cred = Get-Credential

Try
{
    #Connect to Tenant Admin
    Connect-PnPOnline -URL $AdminCenterURL -Credential $Cred
     
    #Check if the site exists already
    $Site = Get-PnPTenantSite | Where {$_.Url -eq $SiteURL}
 
    If ($Site -eq $null)
    {
        #sharepoint online pnp powershell to create communication site
        New-PnPTenantSite -Url $SiteURL -Owner $SiteOwner -Title $SiteTitle -Template $Template -TimeZone $TimeZone -RemoveDeletedSite
        write-host "Site Collection $($SiteURL) Created Successfully!" -foregroundcolor Green
    }
    else
    {
        write-host "Site $($SiteURL) exists already!" -foregroundcolor Yellow
    }
}
catch {
    write-host "Error: $($_.Exception.Message)" -foregroundcolor Red
}
Can you change a SharePoint team site to a communication site?

Yes! You can convert a classic Team site into a Communications site to enable modern communication site features. You can also create a communication site and swap it with any other site like the Root site.
More info: How to Convert Classic Team Site to Communication Site in SharePoint Online?

What is the difference between the SharePoint team site and the communication site?

Communication Sites are scoped at the entire organization to broadcast information, such as an Intranet site, whereas Team sites are generally used for departments/teams to collaborate. Apart from this, there are differences in the Layout, Navigation, Default apps, security, etc.

Can you share a SharePoint communication site with external users?

Yes, Enable external sharing at both the tenant and site collection level. Once done, you can share any external users to your communication site.
More info: How to Share a site with External users in SharePoint Online?

Salaudeen Rajack

Salaudeen Rajack - SharePoint Expert with Two decades of SharePoint Experience. Love to Share my knowledge and experience with the SharePoint community, through real-time articles!

5 thoughts on “Create a Communication Site in SharePoint Online using PowerShell

  • Is it also possible to apply an Site Design while creating the sites?

    Reply
  • Thanks salaudeen, your site is very helpful, thanks in your effort!

    Reply
  • Thanks for the insightful article. It saved my time!

    Reply

Leave a Reply

Your email address will not be published.