Exchange Online - Mailbox Regional Setting Configuration

%3CLINGO-SUB%20id%3D%22lingo-sub-1736237%22%20slang%3D%22en-US%22%3EExchange%20Online%20-%20Mailbox%20Regional%20Setting%20Configuration%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1736237%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%20I%20need%20to%20change%20the%20default%20regional%20setting%20for%20all%20user%20mailboxes%20in%20EXO.%26nbsp%3B%20What%20I've%20tried%20to%20do%20is%20pull%20out%20all%20current%20mailbox%20settings%20using%20this%20command%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3EGet-Mailbox%20-ResultSize%20unlimited%20%7C%20Get-MailboxRegionalConfiguration%20%7C%20Export-csv%20-Path%20c%3A%5Cregionalsettings.csv%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20problem%20is%20that%20the%20command%20eventually%20times%20out%20because%20I%20have%20too%20many%20mailboxes.%26nbsp%3B%20I%20opened%20a%20ticket%20with%20MS%2C%20and%20they%20gave%20me%20some%20suggestions%20but%20wouldn't%20actually%20give%20me%20the%20working%20command.%26nbsp%3B%20Here's%20what%20they%20said%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThere%20are%20a%20couple%20of%20solutions%20or%20workarounds.%3C%2FP%3E%3CUL%3E%3CLI%3EOne%20solution%20could%20be%20to%20split%20the%20command%20and%20run%20it%20against%20each%20database%20instead%20and%20then%20combine%20the%20result.%3C%2FLI%3E%3CLI%3E%3CSPAN%3EAnother%20option%20is%20to%20use%20a%3CSTRONG%3E%20For%20Each%20loop%3C%2FSTRONG%3E%20instead%20of%20%3CSTRONG%3Epiping%3C%2FSTRONG%3E%20the%20command%2C%20this%20seems%20to%20work%20in%20most%20cases%20as%20well.%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3EI'm%20not%20that%20good%20with%20PowerShell%20so%20I'm%20looking%20for%20some%20help.%20I've%20tried%20to%20just%20run%20the%20command%20to%20change%20everything%20to%20Eastern%20Standard%20Time%2C%20but%20I%20have%20the%20same%20issue%20with%20the%20timeouts%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3EGet-Mailbox%20-ResultSize%20Unlimited%20%7C%20Select-Object%20WindowsEmailAddress%20%7CExport-CSV%20c%3A%5CWindowsEmailAddress.csv%0A%0AImport-Csv%20c%3A%5CWindowsEmailAddress.csv%20%7C%20foreach%20%7BSet-MailboxRegionalConfiguration%20-Identity%20%24_.WindowsEmailAddress%20-TimeZone%20%E2%80%9CEastern%20Standard%20Time%E2%80%9D%7D%3B%7BStart-Sleep%20-Milliseconds%20500%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1736237%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExchange%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWindows%20PowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1736295%22%20slang%3D%22en-US%22%3ERe%3A%20Exchange%20Online%20-%20Mailbox%20Regional%20Setting%20Configuration%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1736295%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F816837%22%20target%3D%22_blank%22%3E%40awbruso6%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMaybe%20also%20other%20experts%20can%20give%20a%20suggestion%2C%20but%20from%20my%20side%2C%20I%20will%20run%20this%20in%20a%20patch%2C%3C%2FP%3E%3CP%3Eso%20as%20I%20have%20all%20the%20CSV%2C%20(I%20don't%20know%20how%20many%20mailboxes%20before%20timeout)%2C%20but%20will%20go%20through%20200%20mailboxes%2C%20update%20the%20settings%20than%20another%20200%20Mailbox%2C%20and%20so%20on.%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20this%20good.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1736318%22%20slang%3D%22en-US%22%3ERe%3A%20Exchange%20Online%20-%20Mailbox%20Regional%20Setting%20Configuration%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1736318%22%20slang%3D%22en-US%22%3E%3CP%3EI've%20had%20a%20client%20run%20on%20this%20same%20problem%20-%20we%20resolved%20by%20using%20the%20new%20Exchange%20Powershell%20v2%20module%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-gb%2Fpowershell%2Fexchange%2Fexchange-online-powershell-v2%3Fview%3Dexchange-ps%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-gb%2Fpowershell%2Fexchange%2Fexchange-online-powershell-v2%3Fview%3Dexchange-ps%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20we%20ran%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3EGet-ExoMailbox%20-ResultSize%20unlimited%20%7C%20Get-MailboxRegionalConfiguration%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20was%20much%20faster%20and%20didn't%20time%20out%20-%20although%20they%20may%20have%20far%20fewer%20mailboxes%20than%20your%20tenant.%20Might%20be%20worth%20a%20quick%20try.%20If%20not%20I'm%20sure%20one%20of%20the%20Powershell%20Guru's%20will%20be%20able%20to%20help%20with%20the%20Powershell%20code%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

Hello, I need to change the default regional setting for all user mailboxes in EXO.  What I've tried to do is pull out all current mailbox settings using this command:

 

 

 

Get-Mailbox -ResultSize unlimited | Get-MailboxRegionalConfiguration | Export-csv -Path c:\regionalsettings.csv

 

 

 

The problem is that the command eventually times out because I have too many mailboxes.  I opened a ticket with MS, and they gave me some suggestions but wouldn't actually give me the working command.  Here's what they said:

 

There are a couple of solutions or workarounds.

  • One solution could be to split the command and run it against each database instead and then combine the result.
  • Another option is to use a For Each loop instead of piping the command, this seems to work in most cases as well.

I'm not that good with PowerShell so I'm looking for some help. I've tried to just run the command to change everything to Eastern Standard Time, but I have the same issue with the timeouts:

 

 

 

Get-Mailbox -ResultSize Unlimited | Select-Object WindowsEmailAddress |Export-CSV c:\WindowsEmailAddress.csv

Import-Csv c:\WindowsEmailAddress.csv | foreach {Set-MailboxRegionalConfiguration -Identity $_.WindowsEmailAddress -TimeZone “Eastern Standard Time”};{Start-Sleep -Milliseconds 500}

 

 

 

 

 

2 Replies

@awbruso6 

Maybe also other experts can give a suggestion, but from my side, I will run this in a patch,

so as I have all the CSV, (I don't know how many mailboxes before timeout), but will go through 200 mailboxes, update the settings than another 200 Mailbox, and so on. 

Is this good.

I've had a client run on this same problem - we resolved by using the new Exchange Powershell v2 module https://docs.microsoft.com/en-gb/powershell/exchange/exchange-online-powershell-v2?view=exchange-ps

 

When we ran 

Get-ExoMailbox -ResultSize unlimited | Get-MailboxRegionalConfiguration

 

It was much faster and didn't time out - although they may have far fewer mailboxes than your tenant. Might be worth a quick try. If not I'm sure one of the Powershell Guru's will be able to help with the Powershell code