0

I'm currently using this command to create new SharePoint modern communication sites:

New-PnPSite -Type CommunicationSite -Owner me@acme.com -SiteDesign Blank -Lcid 1044 -Title "My site" -Url https://acme.sharepoint.com/sites/my_site

I've yet to find how to set the timezone for new sites, as there doesn't seem to be no timezone flag. Is there anything I'm missing here? How does others set timezone for new sites?

  • try this and let me know if it works for you. – Ganesh Sanap Mar 23 at 11:37
2

You could use use New-SPOSite to create new SharePoint modern communication sites with timezone:

New-SPOSite -Url https://acme.sharepoint.com/sites/my_site -Owner me@acme.com -Template "SITEPAGEPUBLISHING#0" -StorageQuota 2048 -Title "Communication" -TimeZoneId 13 -LocaleID 1044

References: https://www.sharepointdiary.com/2016/06/sharepoint-online-create-site-collection-using-powershell.html

https://docs.microsoft.com/en-us/powershell/module/sharepoint-online/new-sposite?view=sharepoint-ps

| improve this answer | |
  • Thanks, it worked. – kenneho Mar 31 at 9:41
  • You could accept the answer if it helps you:) – Michael Han_MSFT Mar 31 at 9:47
1

Using PnP-PowerShell, you can do it like below:

$adminUrl = "https://<tenant>-admin.sharepoint.com"
$newSiteUrl = "https://<tenant>.sharepoint.com/sites/Pensaerniaeth" 
$ownerEmail = "<your.name@your.email.com>"

$siteTitle = "Pensaerniaeth"                # Translates to "Architecture" - Bing Translator
$siteTemplate = "SITEPAGEPUBLISHING#0"      # Communication Site Template
$lcid = 1106                                # Welsh (https://capa.ltd/mui-lcids)
$timeZone = 2                               # London (https://capa.ltd/sp-timezones)

Connect-PnPOnline -Url $adminUrl -NoTelemetry
New-PnPTenantSite -Template $siteTemplate -Title $siteTitle -Url $newSiteUrl -Lcid $lcid -Owner $ownerEmail -TimeZone $timeZone

Reference:

Create Communication Sites with a specific primary language using PnP PowerShell.

| improve this answer | |
  • Thansk, but New-PnPTenantSite seems to create classic sites only, while I'm looking to create modern sites. – kenneho Mar 24 at 6:26
  • I have tried using this command to create communication site and it works fine. try it and let me know if you found any issue (don't get confused because of documentation). – Ganesh Sanap Mar 24 at 11:38
  • Thanks, it did in fact work. Strange, because when I tried it some days ago I got a classic site. I assume it's the "template" flag that made the difference, in that perhaps the command defaults to classic site when no flag i provided (which was the case for my test a few days ago). "New-SPOsite" seems to work fine as well though. – kenneho Mar 31 at 9:24
  • You are right, we need to mention the site template. glad it worked for you. Please Upvote(^) and accept as an Answer as it helped you. – Ganesh Sanap Mar 31 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.