We use cookies to improve your experience.
By your continued use of this site you accept such use.
For more details please see our privacy policy and cookies policy.

Script repository

Update mailbox time zone

September 18, 2019 Views: 972

The script updates the time zone of a mailbox in on-premise Exchange.

Parameters:

  • $timeZone- Specifies the time zone that will be set for the mailbox.
  • $exchangeServer - specifies the fully qualified domain name (FQDN) of your Exchange Server
Edit Remove
PowerShell
$timeZone = "Pacific Standard Time" # TODO: modify me
$exchangeServer = "ExchangeServer.domain.com" # TODO: modify me

try
{
    # Create a remote PowerShell session to the Exchange Server
    $session = New-PSSession -configurationname Microsoft.Exchange -connectionURI http://$exchangeServer/PowerShell
    Import-PSSession $session -DisableNameChecking -AllowClobber

    
    Set-MailboxRegionalConfiguration -Identity "%objectGUID%" -TimeZone $timeZone
}
finally
{
    # Close the remote session and release resources
    Remove-PSSession $session
}

Comments 0
Leave a comment
Loading...

Got questions?

Support Questions & Answers