DESCRIPTION
If you have applied an Exchange Mailbox Autoprovision policy, the "Create Exchange mailbox" is always checked and greyed out, and there is no way to uncheck the checkbox. This script can help you to remove this restriction.
Note This code may use functions from the Active Roles Script Policy Best Practices. Please, follow the link to obtain instructions and code for those functions.
SCRIPT
'*********************************************************************************
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
' EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
' WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
'
' IF YOU WANT THIS FUNCTIONALITY TO BE CONDITIONALLY SUPPORTED,
' PLEASE CONTACT ONE IDENTITY PROFESSIONAL SERVICES.
'*********************************************************************************
Option Explicit
'===========================================================================
' onGetEffectivePolicy
'===========================================================================
Sub onGetEffectivePolicy(Request)
If (LCase(Request.Class) <> "user") Then Exit Sub
' Ensure the "create mailbox" option is not greyed out
Call Request.ClearEffectivePolicyInfo("edsaCreateMsExchMailbox", EDS_EPI_UI_AUTO_GENERATED)
' Clear "create mailbox" chekbox on UI
Call Request.SetEffectivePolicyInfo("edsaCreateMsExchMailbox", EDS_EPI_UI_GENERATED_VALUE, "False")
End Sub ' onGetEffectivePolicy
'***** END OF CODE ***************************************************************