Change Regional and Time Settings on all SharePoint Sites

I had some customer requests for changing time zone, regional settings, and calender options for all SharePoint-Online Sites.

I already found some scripts online, also the script from Arleta at technet.
Unfortunatly the powershell-script doesn´t contain all the lines needed, so i´ve updated it.

The following script is going to update the time zone, all regional settings including calendar-options on ALL SharePoint-Online Sites. Also gives full access on every SP-Site in the specified Office365-Tenant. Additional the script sets the default-regional settings on all newly created SP-Sites.

Requirements

Customization

Enter the correct data, and specify the correct variables in the following lines:

$Username="admin@tenantname.onmicrosoft.com"
$AdminPassword=Read-Host -Prompt "Password" -AsSecureString
$creds=New-Object System.Management.Automation.PSCredential($Username,$AdminPassword)
Connect-SPOService https://tenantname-admin.sharepoint.com -Credential $creds

$TimeZoneID=4                     # list of time zones: https://msdn.microsoft.com/library/microsoft.sharepoint.spregionalsettings.timezones.aspx
$LocaleId=1031                    # list of localeIDs: https://www.pdshop.com/locale-id-lcid-code-list-currency-date-kb-21/
$WorkDayStartHour=480             # list of WorkDayStartHours: https://docs.microsoft.com/en-us/previous-versions/office/sharepoint-csom/jj171629(v=office.15)
$WorkDayEndHour=1020              # list of WorkDayEndHours: https://docs.microsoft.com/en-us/previous-versions/office/sharepoint-csom/jj171629(v=office.15)
$FirstDayOfWeek=1                 # list of FirstDayofWeek: https://docs.microsoft.com/en-us/previous-versions/office/sharepoint-csom/jj169347(v=office.15)
$Time24=$True                     # true or false
$CalendarType=1                   # list of CalendarType: https://docs.microsoft.com/en-us/previous-versions/office/sharepoint-csom/ee543260(v=office.15)
$AlternateCalendarType=0          # None alternative calendar
$WorkDays=62                      # list of WorkDays: https://docs.microsoft.com/en-us/previous-versions/office/sharepoint-csom/jj167337(v=office.15)

Download

Verify

To check if the script worked, you can verify the time zones using Get all time zones from a site in SharePoint Online script from Arleta.

Schreibe einen Kommentar