A customer needed to have specific mailbox feature settings on all of there mailboxes. The customer needed the following settings on all mailboxes:
- Disable IMAP and POP
- Enable OWA and ECP
- Disable OutlookAnywhere
- Allow Connected mode in Exchange
- Enable ActiveSync
This is easy to do on all provisioned (already created) mailboxes with a PSH script:
get-mailbox * -resultsize unlimited | set-casmailbox -ImapEnabled:$false -POPEnabled:$false -OWAEnabled:$true
-MAPIBlockOutlookRpcHttp:$true -MAPIBlockOutlookNonCachedMode:$false -ActiveSyncEnabled:$true
The customer also stated that all new mailboxes should have these settings upon creation. The solution is to use the Scripting Agent Cmdlets in Exchange 2010. This is what I did to solve the customer case:
- Created the ScriptingAgentConfig.xml (this must be on all Exchange servers) in the C:\Program Files\Microsoft\Exchange Server\V14\Bin\CmdletExtensionAgents
- Enabling the “Scripting Agent”
Enable-CmdletExttensionAgent “Scripting Agent”
Below is my syntax of my “ScriptingAgentConfig.xml” file:
<?xml version="1.0" encoding="utf-8" ?>
<Configuration version="1.0">
<Feature Name="MailboxProvisioning" Cmdlets="New-Mailbox">
<ApiCall Name="OnComplete">
If($succeeded) {
$Name= $provisioningHandler.UserSpecifiedParameters["Name"]
set-casmailbox -identity $Name -ImapEnabled:$false
set-casmailbox -identity $Name -POPEnabled:$false
set-casmailbox -identity $Name -OWAEnabled:$true
set-casmailbox -identity $Name -MAPIBlockOutlookRpcHttp:$true
set-casmailbox -identity $Name -MAPIBlockOutlookNonCachedMode:$false
set-casmailbox -identity $Name -ActiveSyncEnabled:$true
}
</ApiCall>
</Feature>
</Configuration>
Links
1 comment:
Typo: (extra t)
Enable-CmdletExttensionAgent “Scripting Agent”
Post a Comment