- Mission: change regional settings for a user (or many) mailbox(es)
- Symptoms
- Messages received by an user are being displayed with a different timestamp of the user (for instance: user time zone is UTC-5 but messages are being displayed UTC)
- OR
- You want to standardize exchange regional settings for multiple users
- Messages received by an user are being displayed with a different timestamp of the user (for instance: user time zone is UTC-5 but messages are being displayed UTC)
- Prerequisites
- Have ExchangePowershell module installed
Install-Module Exchange Powershell
- Connect to exchange via powershell before running the commands
- Run Powershell
- Type Connect-ExchangeOnline
- A “Sign in to your account” iteractive box will pop-up. Enter the Exchange Id with enough permissions to write/modify settings
- Have ExchangePowershell module installed
To modify the parameters for a single account run the following command
Set-MailboxRegionalConfiguration -Identity "[User_Mail_address]" -Language "[Language]" -DateFormat "[DateFormat]" -TimeFormat "TimeFormat" -TimeZone "TimeZone"
Example: Set the parameters for user user@techmission.ca
Set-MailboxRegionalConfiguration -Identity user@techmission.ca -Language "en-CA" -DateFormat "yyyy-MM-dd" -TimeFormat "h:mm tt" -TimeZone "Atlantic Standard Time"
You can choose as many parameters as you want (for instance if you want to set only the time zone: Set-MailboxRegionalConfiguration -Identity user@techmission.ca -TimeZone “Atlantic Standard Time”)
For multiple accounts you need to populate a variable and run it in a foreach. If we go oneliner it is something like this:
Get-Mailbox | ? { $_.[the_param_you_want] -match "[the_results_you_want]"}| % { Set-MailboxRegionalConfiguration -Identity $_.UserPrincipalName -Language "en-CA" -DateFormat "yyyy-MM-dd" -TimeFormat "h:mm tt" -TimeZone "Atlantic Standard Time" }
Example: Set the parameters for all users where theirs UserPrincipalNames contains the sub-domain timezone.techmission.ca
Get-Mailbox | ? { $_.UserPrincipalName -match "@timezone.techmission.ca"}| % { Set-MailboxRegionalConfiguration -Identity $_.UserPrincipalName -Language "en-CA" -DateFormat "yyyy-MM-dd" -TimeFormat "h:mm tt" -TimeZone "Atlantic Standard Time" }
You can find the cmdlet description and parameters following this link Set-MailboxRegionalConfiguration (ExchangePowerShell) | Microsoft Learn