Property in Active Directory for Exchange Server?

I am using the Exchange Server and Active Directory Domain Services Activities to automate the onboarding process.

How can I uncheck this box using the property of AD or powershell?
If it can be changed through the property of AD then it is to be preferred.

@ovidiuponoran @Pablito

If you are using powershell, set this parameter “-EmailAddressPolicyEnabled” as false.

What object is this? Distribution group or mailbox?

This parameter is available for both distribution list and mailbox.

Refer this link for Set-DistributionGroup powershell command:

Refer this link for Set-Mailbox powershell command:


It is for mailbox.
Can you share the xaml?

ok. Please refer Set-Mailbox command as provided above.

Build a powershell script as follows:


$password = $password | convertto-securestring -asplaintext -force
$credential = new-object$username,$password)
$session = new-pssession -configurationname -connectionuri $exchangeURI -authentication $authType -allowredirection -credential $credential -ErrorAction Stop
invoke-command -session $session -scriptblock { Set-Mailbox -Identity $args[0] -EmailAddressPolicyEnabled $false} -argumentlist $mailboxName -ErrorVariable errorVar1 | out-string

Prepare this powershell and save it in text file, read this text file into a string variable and pass it invoke-powershell activity in UiPath. Also pass input parameters to Invoke-Powershell activity.

Please try this. I’ll share xaml when I find time.

1 Like


Please share the xaml

Hi @kumar.varun2 (38.1 KB)

Please try this and let me know in case of any doubts.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.