Skip to content
Menu
SharePoint Gems
  • Power Platform
  • Development
    • SharePoint 2013
  • Migration
  • Administration
  • SP Online
  • Contact
  • About
    • Privacy Policy
SharePoint Gems

Create a Communication Site using PowerShell

Posted on February 29, 2020September 29, 2021

Hello SharePointers,
Today in this article we will learn about how to create a SharePoint site using PowerShell, So let’s start. I hope you enjoyed our last post and learned How to move/copy files between libraries using Powershell.

Requirement:

Create a SharePoint communication site and Team sites using PowerShell.

Contents hide
1 How to create a Communication site in SharePoint online?
2 Create a new communication site in SharePoint online
3 Create a SharePoint online communication site with PowerShell.
4 Create a Communication site in SharePoint online using PnP PowerShell
5 Share this:
6 Like this:
7 Related

How to create a Communication site in SharePoint online?

SharePoint online has a recent addition in its Space and that is Communication Site! The modern SharePoint communication site templates are designed to leverage information to a broader audience such as an entire organization or teams to keep them informed as well as engaged. you can share reports, images, news, documents, events and other information that communicates key information into a central place.

Communication sites provide the configurable template for the sites and pages to make your work easy while communicating a message to a larger audience. when you create a communication site in SharePoint, you can start with a blank site or choose one of the available templates, each one of them comes with default web parts to help users to get started faster.

Create a new communication site in SharePoint online

Please follow the below steps to create a new communication site in SharePoint Online.

  • Login to New SharePoint Admin center as tenant administrator or SharePoint Online Administrator.
  • Click on “Sites” >> “Active Sites” from the left navigation >> Click on “Create” from available options >> select “Communication site” to create a new communication site.
How to create a Communication site in SharePoint online
Step 1.
  • Fill the site properties like “site name” which will automatically become a URL of the site. Though you can edit a URL if needed. The communication sites are always been created under the /sites/ managed path by default.
  • Choose any template from available 3 Templates. The topic is selected by default.
PnP PowerShell to create a Communication site in SharePoint online
Step 2
  • Change the language of the site if you wish to, English is by default.
  • Additionally, you can give a description by adding some text which lets people know the purpose of your site under “Advanced Settings” and then click on “Finish“.

As soon as you click on finish SharePoint creates your site so quickly and will appear in sites list. Now, we can customize our information. When ready, you can share it with other people by adding the permissions snd sharing with others. communication sites don’t come with office 365 group.

Communication site using PowerShell in SharePoint online
Result

You can also create a site from “SharePoint Home” (https://yourtenat.sharepoint.com/_layouts/15/sharepoint.aspx), you can view this page simply by going to office 365 app launcher, click SharePoint.

Create Communication site in SharePoint Online using PowerShell
Create a Sharepoint site from the Home page

Below are the areas where the communication site template suites well.

  • a typical Intranet, Extranet, and department sites.
  • Product or service-oriented sites, new portals.
  • campaigns, insights, events, business highlights and reviews

OK, Enough the explanation and let us create a communication site in SharePoint Online with PowerShell.

Create a SharePoint online communication site with PowerShell.

Using SPO Service

#Declare Parameters
$AdminCenterUrl = "https://spforfun-admin.sharepoint.com"
$SiteUrl = "https://Spfordun.sharepoint.com/sites/SharePointgems"
$SiteTitle = "SharePoint Gems"
$siteOwner = "sarang@spforfun.com"

#Connect SharePoint Online
Connect-SPOService -Url $AdminCenterUrl -credentials (Get-Credential)

#Poershell to create new communication site
New-SPOSite -Url $SiteUrl -Owner $SiteOwner -Template "SITEPUBLISHING#0"  -Title $SiteTitle -StorageQuota 1048

Let’s move ahead and add some error-handling code in this and re-write the script in PnP PowerShell.

Create a Communication site in SharePoint online using PnP PowerShell

Here is a code for How to create a communication site using PnP PowerShell in SharePoint Online.

New-PnpSite -Type CommunicationSite -Title SharePointGems -Url "https://spforfun.sharepoint.com/sites/SharePointGems" -SiteDesign Topic 

Full Lines of code goes here:

#Declare all variables
$AdminCenterUrl = "https://spforfun-admin.sharepoint.com"
$SiteUrl = "https://Spfordun.sharepoint.com/sites/SharePointgems"
$SiteTitle = "SharePoint Gems"
$siteOwner = "sarang@spforfun.com"
$Template = "SITEPUBLISHING#0"  #COMMUNICATION SITE TEMPLATE

#Get Credentials to connecct
$cred = Get-Credentials
Try
{
  #connect Admin site
  Connect-PnPOnline -Url $AdminCenterUrl -Credentials $Cred
  
  #Check if site exist
  $site = Get-PnPTenantSite | Where {$_.Url -eq $SiteUrl}
  
  If ($Site -eq $null)
  {
    #SharePoint Online PnP Powershell to create communication site
    Create-PnpTenantSite -Url $SiteUrl -Owner $siteOwner -Title $SiteTitle -Tempalte $Template
   write-Host "Site Collection $SiteUrl created Successfully!" -f Green
  }
  else
  {
    write-Host "Site $SiteUrl already Exist!" -f Yellow
  }
}
Catch
{
 wirte-Host "Error Occurred $($_.Exception.Message)" -f Red
}

In this way, we can create a Communication site in SharePoint Online using Powershell.

See more tutorials of SharePointgems

know more about new-pnpsite here and SharePoint Diary.

Share this:

  • Print
  • Twitter
  • Facebook
  • LinkedIn
  • WhatsApp
  • Telegram
  • Pinterest
  • Reddit

Like this:

Like Loading...

Related

5 thoughts on “Create a Communication Site using PowerShell”

  1. Pingback: Register application in Azure portal - SharePoint Gems
  2. Pingback: PowerShell to create Team Site in SharePoint Online - SharePoint Gems
  3. Pingback: SharePoint Online: Delete Folders using PnP PowerShell - SharePoint Gems
  4. Pingback: Retrieve all Communication Sites using PnP PowerShell - SharePoint Gem
  5. Pingback: Retrieve all users from Site Collection using PowerShell - SharePoint Gems

Leave a ReplyCancel reply

  • Development
  • Migration
  • Poweer Apps
  • Power Automate
  • Power Platform
  • SharePoint 2013
  • SharePoint Administration
  • SharePoint Online
  • Tips
  • Uncategorized

Best of Computers

Blog Stats

  • 67,509 hits

Subscribe

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,433 other subscribers
Buy Me Coffee
©2025 SharePoint Gems | Powered by WordPress and Superb Themes!
Menu
SharePoint Gems
  • Power Platform
  • Development
    • SharePoint 2013
  • Migration
  • Administration
  • SP Online
  • Contact
  • About
    • Privacy Policy
%d