Script Repository


Check whether 'Automatically update e-mail addresses based on e-mail address policy' option is enabled

February 24, 2021
2130

The script checks whether the Automatically update e-mail addresses based on e-mail address policy option is enabled for an Exchange recipient. To add the check to your business rule, custom command or scheduled task using the If PowerShell script returns true condition.

Return Values:

  • True: the option is enabled for the recipient;
  • False: either the option is not enabled for the recipient or the AD object is not a reciepent in Exchange.
Edit Remove
PowerShell
$Context.ConditionIsMet = $False

try
{
    $mailboxParams = $Context.TargetObject.GetMailParameters()
}
catch
{
    return
}

$Context.ConditionIsMet = $mailboxParams.EmailAddressPolicyEnabled -eq $True

Comments ( 0 )
No results found.
Leave a comment