Hello,
As far as we understand, you need to get the mail property value of each object specified in a custom object multi-valued property. If so, the below script can be used. It outputs the mail property value of each object to the execution log. In the script, the $propertyName variable specifies the name of a custom object multi-valued property.
$propertyName = "adm-CustomAttributeObjectMultiValue1" #TODO:
modify me
# Get property values
try
{
$userDNs = $Context.TargetObject.GetEx($propertyName)
}
catch
{
# The property is not specified
return
}
foreach ($dn in $userDNs)
{
# Bind to a user
$user = $Context.BindToObjectByDN($dn)
try
{
# Get mail property value
$userEmail = $user.Get("mail")
$Context.LogMessage("Email address: $userEmail", "Information")
}
catch
{
$Context.LogMessage("The user " + $user.FullName + " has no email address", "Information")
}
}