Exchange 2010: Disable Outlook Anywhere feature for specific Mailboxes


I had a special need to disable Outlook Anywhere for few mailboxes.  Outlook profile created automatically with help from Auto Discover feature. It also enables Outlook Anywhere automatically. You may go into Outlook profile and disable the Proxy settings (Outlook Anywhere). Believe me, it will be enabled again when next time Outlook is started.

To disable Outlook Anywhere completely from server side, here are the Powershell cmdlets. These cmdlets should be run on Exchange Management Shell.

The following command will disable Outlook Anywhere for one Mailbox.

Get-Mailbox –Identity <UserName> | Set-CASMailbox -MAPIBlockOutlookRpcHttp:$True

If you have list of mailboxes that needs Outlook Anywhere to be disabled, you may use the following Powershell script. Type the mailbox names (username) on a text file by each username in a line. Save the text file as mailboxes.txt. Open the Exchange Management Shell and navigate to the location where the text file is saved.

Copy the contents of the script below and save it in a file as “DisableOA.ps1”. Run the script on the text file location as ./DisableOA.ps1. Or you can just type the script on the Exchange management shell itself.

$Mailboxes = Get-Content ./Mailboxes.txt

Foreach ($Mailbox in $Mailboxes)
{
       Set-CASMailbox -Identity $Mailbox -MAPIBlockOutlookRpcHttp:$true –Verbose
}

Advertisements

One thought on “Exchange 2010: Disable Outlook Anywhere feature for specific Mailboxes

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s