Hello,
This can be done with PowerShell scripts. For example, you can extend the Custom Command that you use for deprovisioning with the Run a program or PowerShell script action containing a script that changes the e-mail addresses. To add such an action:
-
Launch Adaxes Administration Console.
-
In the Console Tree, navigate to and select the Custom Command that you use for deprovisioning.
-
Select the set of actions and conditions that you would like to add the action to.
-
Click the Add Action button.
-
Select he Run a program or PowerShell script action and paste the following script in the Script field.
$mailboxParams = $Context.TargetObject.GetMailParameters()
$mailboxParams.EmailAddressPolicyEnabled = $False
$emailAddresses = $mailboxParams.EmailAddresses
for ($i = 0; $i -lt $emailAddresses.Count; $i++)
{
$emailAddress = $emailAddresses.GetAddress($i,[ref]"ADS_PROPERTY_NONE")
$emailAddress.Address = "disabled." + $emailAddress.Address
}
$mailboxParams.EmailAddresses = $emailAddresses
$Context.TargetObject.SetMailParameters($mailboxParams, "ADM_SET_EXCHANGE_PARAMS_FLAGS_NONE")