Description

The script updates time zone in regional settings of all SharePoint Online sites to which you have access. The time zone can be verified by going to Site Settings>Regional Settings.

 

The script requires the following libraries:

 

PowerShell
Edit|Remove
Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"  
Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"  
 

Enter the correct data and specify the time zone you'd like to set. If unsure about the options, you can verify the time zones using Get all time zones from a site in SharePoint Online script:

PowerShell
Edit|Remove
# Insert the credentials and the name of the admin site 
$Username="ana@tenant.onmicrosoft.com" 
$AdminPassword=Read-Host -Prompt "Password" -AsSecureString 
$creds=New-Object System.Management.Automation.PSCredential($Username,$AdminPassword) 
Connect-SPOService https://tenant-admin.sharepoint.com -Credential $creds 
$TimeZoneID=43   # list of time zones: https://msdn.microsoft.com/library/microsoft.sharepoint.spregionalsettings.timezones.aspx