Manage Client Access Settings through PowerShell

Written by Divya Gunasekaran, Microsoft Online Services PM Admins can now manage client access settings for their Microsoft Online users through PowerShell. Updates to Get-MSOnlineUser and the new Set-MSOnlineCASMailbox cmdlet allow admins to specify whether Exchange ActiveSync or Outlook Web App (OWA) is enabled for users. 1.  Get-MSOnlineUser : This cmdlet can be used to retrieve the properties of a specified user in Microsoft Online Services. Three properties have been added to the output of this cmdlet: ActiveSyncEnabled : Returns a Boolean indicating whether ActiveSync is enabled for a user’s mailbox. This property will return False for users that do not have mailboxes. OWAEnabled : Returns a Boolean indicating whether Outlook Web App is enabled for a user’s mailbox. This property will return False for users that do not have mailboxes. POPEnabled : Returns a Boolean indicating whether POP3 access is enabled for a user’s mailbox. This property will return False for users that do not have mailboxes. 2. Set-MSOnlineCASMailbox: This cmdlet can be used to enable or disable ActiveSync or Outlook Web App for a user’s mailbox.  Admins can specify from the command line whether to enable Exchange ActiveSync or OWA for a user mailbox. For example, the following command can be run to disable ActiveSync and enable Outlook Web App for the user alexei@tailspintoys.com: C:PS> Set-MSOnlineCASMailbox -Identity alexei@tailspintoys.com -Credential $companyAdminCred -ActiveSyncEnabled False -OWAEnabled True The Set-MSOnlineCASMailbox also accepts some input from the pipeline by property name.  One use for this functionality is to run the cmdlet on information imported from a csv file. For example, let’s say we want to enable both ActiveSync and OWA for the user alexei@tailspintoys.com and to enable ActiveSync and disable OWA for the user pavel@tailspintoys.com. The admin would create a csv file (named “CASmailboxes.csv” in this example) and run the following command: Identity ActiveSyncEnabled OWAEnabled alexei@tailspintoys.com True True pavel@tailspintoys.com True False C:PS> Import-Csv –path C:CASmailboxes.csv | Set-MSOnlineCASMailbox -Credential $companyAdminCred Please note that the Set-MSOnlineCASMailbox cmdlet does not modify or remove the ActiveSync policy currently assigned to a user’s mailbox. If an ActiveSync policy has been assigned to a user mailbox and ActiveSync is then disabled, the same policy will be applied after ActiveSync has been re-enabled for that user. If no ActiveSync policy has been assigned to the user mailbox, the default policy will be applied when ActiveSync is enabled. To use the updated cmdlets, admins must download the latest 32-bit or 64-bit version of the Microsoft Online Services Migration Tools. 

Original post:
Manage Client Access Settings through PowerShell


Leave a comment!

You must be logged in to post a comment.