skip to Main Content

Managing Mailbox Time Zone and Language setting by using PowerShell | Office 365

In the current article, we will review how to use the PowerShell commands for managing Mailbox Time Zone and Language setting Exchange Online environment.

Time zone and language

By default, when a user opens the OWA (Outlook web apps) web interface for the first time, special windows will be displayed, asking the user to select the values for Time Zone and Language.

As an Exchange Online administrator, Many time we would like to set a predefined setting for this values (Time Zone and Language) for making the user life easier and avoiding users mistakes.

In this article, we will learn how to manage the Time Zone and Language setting for a: particular Mailbox and, by using a Bulk operation that will set values for a Multiple Mailboxes.

1. Set Time Zone and Language: Mailbox settings

1.1 – Set Time Zone for a Mailbox

PowerShell command syntax:

Set-MailboxRegionalConfiguration <Identity> -TimeZone <"Time Zone">

PowerShell command example:

Set-MailboxRegionalConfiguration John -TimeZone "Pacific Standard Time"

1.2 – Set Time Zone + Language for a Mailbox

PowerShell command syntax:

set-MailboxRegionalConfiguration <Identity> -TimeZone <"Time Zone"> –Language <Language Code>

PowerShell command example:

Set-MailboxRegionalConfiguration John -TimeZone "Pacific Standard Time" –Language en-US

1.3 – Set Time Zone + Language + Date/Time Format for a Mailbox

PowerShell command syntax:

Set-MailboxRegionalConfiguration <Identity> -TimeZone <"Time Zone"> –Language -DateFormat <"Date Format"> –TimeFormat <"Time Format">

PowerShell command example:

Set-MailboxRegionalConfiguration <Identity> -TimeZone "Pacific Standard Time" –Language en-US -DateFormat "dd/MM/yyyy" -TimeFormat "h:mm tt"

2. Set Time Zone and Language (Bulk Mode)

2.1 – Set Time zone on ALL Mailboxes (Bulk Mode)

PowerShell command syntax:

$Users = Get-Mailbox -ResultSize unlimited -Filter {(RecipientTypeDetails -eq 'UserMailbox')} $users | %{Set-MailboxRegionalConfiguration $_.Identity -TimeZone <"Time Zone"> }

PowerShell command example:

$Users = Get-Mailbox -ResultSize unlimited -Filter {(RecipientTypeDetails -eq 'UserMailbox')} $users | %{Set-MailboxRegionalConfiguration $_.Identity -TimeZone "Pacific Standard Time" }

2.2 – Set Time zone + Language to ALL Mailboxes (Bulk Mode)

PowerShell command syntax:

$Users = Get-Mailbox -ResultSize unlimited -Filter {(RecipientTypeDetails -eq 'UserMailbox')} $users | %{Set-MailboxRegionalConfiguration $_.Identity -TimeZone <"Time Zone"> –Language <Language Code>}

PowerShell command example:

$users = Get-Mailbox -ResultSize unlimited -Filter {(RecipientTypeDetails -eq 'UserMailbox')} $users | %{Set-MailboxRegionalConfiguration $_.Identity -TimeZone "Pacific Standard Time" –Language en-US }

2.3 – Correct Time Zone setting for Mailbox with wrong time zone (Bulk Mode)

PowerShell command syntax:

$MymailBoxes = Get-Mailbox
ForEach ($ExamineDmailbox in $MymailBoxes){ $regionalconfig = Get-MailboxRegionalConfiguration –identity $examinedmailbox.identity
if ($regionalconfig.timezone -ne <"Time Zone"> ){ Set-MailboxRegionalConfiguration -identity $examinedmailbox.identity -TimeZone <"Time Zone"> -confirm:$False } }

PowerShell command example:

$Mymailboxes = Get-Mailbox
ForEach ($examinedmailbox in $Mymailboxes){ $regionalconfig = Get-MailboxRegionalConfiguration –identity $examinedmailbox.identity
if ($regionalconfig.timezone -ne "Pacific Standard Time" ){ Set-MailboxRegionalConfiguration -identity $examinedmailbox.identity -TimeZone "Pacific Standard Time" -confirm:$False } }

3. Display Information about Time Zone and Language

3.1 – Display a list of time zones you can use

PowerShell command syntax:

Get-ChildItem "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Time zones" | FL pschildname

3.2 – Display information about Time Zone and Language for a specific user

PowerShell command syntax:

Get-MailboxRegionalConfiguration <Identity>

PowerShell command example:

Get-MailboxRegionalConfiguration John

3.3 – Display Time zone and Language settings for all users

PowerShell command syntax:

$Users = Get-Mailbox -ResultSize unlimited -Filter {(RecipientTypeDetails -eq 'UserMailbox')} $Users | Get-MailboxRegionalConfiguration
The o365info Team

The o365info Team

This article was written by our team of experienced IT architects, consultants, and engineers.

This Post Has One Comment

  1. Is it too much to ask to find the global time zone codes that MS uses in Exchange Online? I constantly fight these errors in my scripts:

    Cannot process argument transformation on parameter ‘TimeZone’. Cannot convert value “Eastern
    European Time” to type “Microsoft.Exchange.Data.Storage.Management.ExTimeZoneValue”. Error: “The
    time zone specified is not valid.”

     

Leave a Reply

Your email address will not be published. Required fields are marked *