PowerShell: Setting the global reading pane view in OWA

Attached is a script that can be used to update the global reading pane view for OWA, and can be run against multiple mailboxes from PowerShell.  It requires the EWS Managed API to be installed on the client machine, and if running against multiple mailboxes you’ll need to grant impersonation rights to the authenticating account.  You can specify one of the three available reading pane positions (hide, right, or bottom) as desired – this is best done while the user is logged out of OWA.

Glen Scales showed how to update reading pane position on his blog some time ago.  This script does exactly the same thing, functionally.

To run the script against multiple mailboxes, this can be done from an Exchange PowerShell session, e.g.

$m = Get-Mailbox
$m | ForEach-Object {
     .\set-owareadingpane.ps1 $_.PrimarySmtpAddress right -username admin@domain.com -password <password> -ewsurl “https://outlook.office365.com/ews/exchange.asmx” –impersonate

The above will set the reading pane position to the right on all mailboxes within the domain (and assumes Office 365, so the Office 365 EWS URL is specified so that autodiscover is not used).


-Mailbox:                Specifies the mailbox to be accessed
-PanePosition:           Specifies the location of the reading pane (can be Hide, Right, or Bottom)
-Username:               Username used to authenticate with EWS
-Password:               Password used to authenticate with EWS
-Domain:                 Domain used to authenticate with EWS
-Impersonate:            If specified, impersonation is used to access the mailbox
-EwsUrl:                 EWS Url (if omitted, then autodiscover is used)
-EwsManagedApiPath:      Path to managed API (if omitted, a search of standard paths is performed)
-IgnoreSSLCertificate:   Whether to ignore any SSL errors (e.g. invalid certificate)


Comments (0)