Script repository
The scripts check whether the target object has a mailbox in Exchange Online. The scripts should be executed in the If PowerShell script returns true condition of a business rule, custom command or scheduled task configured for the required object type.
Script 1: Check in Adaxes resources
$Context.ConditionIsMet = $Context.TargetObject.RecipientType -eq "ADM_EXCHANGERECIPIENTTYPE_MAILBOXENABLED" -and `
$Context.TargetObject.RecipientLocation -eq "ADM_EXCHANGERECIPIENTLOCATION_EXCHANGEONLINE"Script 2: Check directly in Exchange Online
$Context.ConditionIsMet = $False
try
{
# Get mail parameters
$Context.TargetObject.GetMailParameters()
}
catch
{
# Mailbox does not exist
return
}
$Context.ConditionIsMet = $True
Comments 0
You must be signed in to comment.