Script Repository


Check whether user has mailbox in Exchange Online

March 23, 2016
1706

The script can be used in Business Rules, Custom Commands and Scheduled Tasks to check whether the user on which it is executed has a mailbox in Exchange Online. To use the script in your rule, command or task, add the If PowerShell script returns true condition that runs the script.

Edit Remove
PowerShell
$Context.ConditionIsMet = $Context.TargetObject.RecipientType -eq "ADM_EXCHANGERECIPIENTTYPE_MAILBOXENABLED" -and `
    $Context.TargetObject.RecipientLocation -eq "ADM_EXCHANGERECIPIENTLOCATION_OFFICE365"

Comments ( 0 )
No results found.
Leave a comment