A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
Hi @Anonymous ,
Welcome to Q&A Forum!
Please run the below PowerShell script as an admin on the SharePoint Online Management Shell:
#Set Config Variables
$SiteURL = "https://domian-my.sharepoint.com/personal/username_domain_onmicrosoft_com/"
$TimezoneName = "(UTC-08:00) Pacific Time (US and Canada)"
#English en-US 1033
$LocaleId = "1033"
#Connect to SharePoint Online with PnP PowerShell
#Enter the user account and password corresponding to the Onedrive page
Connect-PnPOnline $SiteURL -Credentials (Get-Credential)
#Get the Web
$web = Get-PnPWeb -Includes RegionalSettings.TimeZones
#Get the time zone
$Timezone = $Web.RegionalSettings.TimeZones | Where {$_.Description -eq $TimezoneName}
If($Timezone -ne $Null)
{
#Update time zone of the site
$Web.RegionalSettings.TimeZone = $Timezone
$Web.RegionalSettings.LocaleId = $LocaleId
$Web.Update()
Invoke-PnPQuery
Write-host "Timezone Updated Successfully!" -ForegroundColor Green
}
else
{
Write-host "Timezone $TimezoneName not found!" -ForegroundColor Yellow
}
Here is my test:
Reference:
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
Thanks,
Echo Du
====================================
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.