Hello,
Yes, it is possible using the below script for a DN syntax property like the Manager one. In the script, the $propertyName variable specifies the LDAP name of the property.
$propertyName = "manager" #TODO: modify me
# Get the object DN
try
{
$dn = $Context.TargetObject.Get($propertyName)
}
catch
{
$Context.LogMessage("Property $propertyName is empty.", "Information")
return
}
# Get object email
try
{
$object = $Context.BindToObjectByDN($dn)
$objectEmail = $object.Get("mail")
}
catch
{
$Context.LogMessage("Object with DN $dn does not exist or has no email specified.", "Information")
return
}