How to remove email provisioning for new user accounts?

This seems like it should be simple and straightforward yet I am stumped.

I have a new OU where I will be creating user accounts that will not have email enabled.  

I do not have any policies applied for email generation yet when I create a new user, the "Create an Exchange Mailbox" is still part of the provisioning.  

How do I remove it for this specific OU?

Thanks in advance.

Parents Reply Children
  • Nice! Thank you.

    Ok... I tried this.  I only added the portion Script for User Objects, imported it and created a new provisioning policy to execute this script. I applied it to my test OU.

    When I create a new user in my test OU - the checkbox to Create an Exchange mailbox is still enabled.  Disappointed

    Any ideas?

    function onGetEffectivePolicy($Request)
    {
    if($Request.Class -ne "user"){return}
    $Request.ClearEffectivePolicyInfo("edsaCreateMsExchMailbox", $Constants.EDS_EPI_UI_AUTO_GENERATED)
    $Request.ClearEffectivePolicyInfo("edsaCreateMsExchMailbox", $Constants.EDS_EPI_UI_GENERATED_VALUE)
    $Request.SetEffectivePolicyInfo("edsaCreateMsExchMailbox", $Constants.EDS_EPI_UI_GENERATED_VALUE, $FALSE)
    $Request.SetEffectivePolicyInfo("edsaCreateMsExchMailbox", $Constants.EDS_EPI_UI_AUTO_GENERATED, $FALSE)
    }

  • Odd that this is not working.

    Another (codeless) way I have done this in the past is to use a PVG (Property Value Generation) policy rule to set edsaCreateMSExchMailbox to $false - i.e. "edsaCreateMSExchMailbox must be FALSE".

    So just add a PVG rule to the provisioning policy you linked to your test OU that contains the above PVG rule.

  • That worked... and much simpler.

    THANKS!!