Hello,
This can be done using two conditions: If has an Exchange mailbox and If PowerShell script returns true. For example, you can create a Scheduled task like the following:
-
Launch Adaxes Administration Console.
-
Right-click your Adaxes service node, navigate to New and click Scheduled Task.
![](?qa=blob&qa_blobid=17316542852557658421)
-
On step 3 of Create Scheduled Task wizard select User Object type and click Next.
![](?qa=blob&qa_blobid=10104917248531285343)
-
Click Add Action.
-
Select Run a program or Powershell script.
-
Enter a short description and paste your script into the Script field.
![](?qa=blob&qa_blobid=7520354433034149412)
-
Click OK and double-click Always.
-
Select If has an Exchange mailbox and click OK.
![](?qa=blob&qa_blobid=15687604864117325556)
-
Right-click the condition you have created and click Add New Condition.
![](?qa=blob&qa_blobid=8776235098455637030)
-
Select If PowerShell script returns true.
-
Paste the script below into the Script field.
$Context.ConditionIsMet = $Context.TargetObject.RecipientLocation -eq "ADM_EXCHANGERECIPIENTLOCATION_ONPREMISE"
-
Enter a short description and click OK.
![](?qa=blob&qa_blobid=5262641221715797813)
-
Click Next and finish creating the Scheduled Task. You should have something like the following:
![](?qa=blob&qa_blobid=11176845697024723338)