Skip to content

Instantly share code, notes, and snippets.

@pmatthews05
pmatthews05 / TenantSiteCollectionDefaultTimeZone.ps1
Last active May 14, 2020 11:28 — forked from luismanez/TenantSiteCollectionDefaultTimeZone.ps1
Trying to hack SharePoint Online to Configure Site Collection Tenant default timezone (context here: https://twitter.com/cann0nf0dder/status/1260607421111767042)
<#
.SYNOPSIS
Updates the Default TimeZone for sites in the Admin Centre.
.EXAMPLE
Using Your Account.
First connect using Connect-PnPOnline -PnPO365ManagementShell -url:<Tenant-Admin> -launchBrowser
.\TenantSiteCollectionDefaultTimeZone.ps1 -TimeZoneId:2
.EXAMPLE
Using Certificate and AppId ()
First connect using Connect-PnpOnline -ClientId:<ClientId> -Tenant:<Tenant> -CertificatePath:<PathToCert> -CertificatePassword:<SecureStringPassword> -Url:<Tenant-Admin>