Add mass mailbox locale changing functionality

This commit is contained in:
Jeremy D. Berkleef 2021-11-04 09:58:20 +01:00
parent c26a0d8b14
commit 429240f403
2 changed files with 19 additions and 1 deletions

View File

@ -39,4 +39,7 @@
### 5. Export a series of mailboxes to .pst
This has only been tested against On-Prem Exchange.
This option will export the mailboxes found via the search term to a .pst. For some reason, Exchange requires a UNC path for the export.
This option will export the mailboxes found via the search term to a .pst. For some reason, Exchange requires a UNC path for the export.
### 6. Set mailbox locale based on a search term
This allows you to change a large number of mailboxes' language, time zone and date format settings in one go.

View File

@ -25,6 +25,10 @@
Write-Host -ForegroundColor Cyan " '5' " -NoNewline
Write-Host "to export a list of mailboxes to .pst based on a search term."
Write-Host "6: Press" -NoNewline
Write-Host -ForegroundColor Cyan " '6' " -NoNewline
Write-Host "to change mailbox locale/language based on a search term."
Write-Host "Q: Press" -NoNewline
Write-Host -ForegroundColor Red " 'Q' " -NoNewline
Write-Host "to quit."
@ -126,6 +130,17 @@ do
New-MailboxExportRequest -Mailbox $mailbox -FilePath "$exportPath.pst"
}
}
'6' {
$searchTerm = Read-Host -Prompt "Input Query"
$targetLanguage = Read-Host -Prompt "Language to switch to (nl-NL for Dutch)"
$targetTimezone = Read-Host -Prompt "Time zone to switch to ("W. Europe Standard Time" for GMT -1)"
$targetDateFormat = Read-Host -Prompt "Date format to switch to (e.g. "d-M-yyy")"
#Search mailboxes and apply the changes
Get-Mailbox | Where-Object {$_.EmailAddresses -like "$searchTerm"} | Set-MailboxRegionalConfiguration -Language "$targetLanguage" -TimeZone "$targetTimezone" -DateFormat "$targetDateFormat"
}
}
Read-Host -Prompt 'Press Enter to Continue'
}