Script repository
The script removes all the trustees from the Send As list of a mailbox. To execute the script, create a business rule, custom command or scheduled task configured for the User object type.
Parameters
$pipelined- set to$trueto update Exchange properties through the Adaxes pipeline to create log records, apply business rules, security roles, etc. Set to$falseto perform the update directly in Exchange (Adaxes functionality will not be applied).
# Bind to the user.
$user = $Context.BindToObjectByDNEx("%distinguishedName%", $True)
# Create an instance of the AdmExchangeMailboxParameters class.
$mailboxParams = New-Object "Softerra.Adaxes.Adsi.Exchange.AdmExchangeMailboxParameters"
$mailboxParams.SendAsModificationEnabled = $True
# Save changes
$user.SetMailParameters($mailboxParams, "ADM_SET_EXCHANGE_PARAMS_FLAGS_NONE")
Comments 0
You must be signed in to comment.