0 votes

can someone explain me how can I use this virual property adm-CustomAttributeTextMultiValue1?
Thanks for your help

by (700 points)

1 Answer

0 votes
by (216k points)

Hello,

The property can be used to store multiple string (text) values, for which you can't find an appropriate Active Directory property.

The same as with any other Adaxes virtual property, CustomAttributeTextMultiValue1 is stored not in Active Directory, but on Adaxes backend, and you can use it as any other property of AD objects.

0

Hello,

I'm refrencing %adm-CustomAttributeTextMultiValue1% in a email notification however only the first value is returned?

This behaviour is by design.

Do I still need to use the script?

Yes, currently all values can be returned only using a script. However, we have this feature on our TODO list.

0

Hi all, there is any way to put all values in a mail with other text? For example: Good morning.... below the list: %adm-CustomAttributeTextMultiValue1%_1 %adm-CustomAttributeTextMultiValue1%_2

thanks

I hope my request is clear Thanks in advance, Simone

0

Hello Simone,

Unfortunately, there is no such possibility using value references. It can only be done by retrieving all the property values in a script and sending the email in the very same script. To obtain all values of a multivalued property, use method GetEx.

0

Thanks, can I have an example? Sorry but I'm not confident with this type of scripts

0

Hello Simone,

Sure, here is an example of the script. In the script:

  • $multiValuedPropertyName - Specifies the LDAP name of the multivalued property.
  • $separator - Specifies the separator for values of the property in the email notification.
  • $to - Specifies the address of the email notification recipient.
  • $subject - Specifies the subject of the email notification.
  • $messageTemplate - Specifies the email notification template. In the template, the {0} and {1} placeholders will be replaced with the property LDAP name and its values accordingly.
$multiValuedPropertyName = "adm-CustomAttributeTextMultiValue1" # TODO: modify me
$separator = ";" # TODO: modify me

# Mail settings
$to = "recipient@domain.com" # TODO: modify
$subject = "My Subject" # TODO: modify
$messageTemplate = @"
Hello,

Here are values of property {0} for user %fullname%:
{1}
"@ # TODO: modify

# Get property values
try
{
    $valuesArray = $Context.TargetObject.GetEx($multiValuedPropertyName)
}
catch
{
    $Context.LogMessage("Property $multiValuedPropertyName is empty.", "Warning")
    return
}

# Send mail
$values = [System.String]::Join($separator, $valuesArray)
$message = [System.String]::Format($messageTemplate, @($multiValuedPropertyName, $values))
$Context.SendMail($to, $subject, $message, $NULL)

Related questions

0 votes
1 answer

Using the powershell module, I know how to create a scheduled task, and also how to bind to a scheduled task that is already known. I also have used code to try creating ... same time as another. These are all one-time tasks and will be removed once executed.

asked Jan 19 by aweight (40 points)
0 votes
1 answer

Hi, we have replaced our local Exchange server with installation of Exchange Management Tools (EMT) installed directly on Adaxes server. And my question is: How can I force ... this is how 'Set External Senders' option looks in Adaxes config Thanks in advance

asked Apr 1, 2023 by KIT (910 points)
0 votes
1 answer

Occationally Service Desk staff need to clear a DNS record when a desktop has been reimaged but is keeping the same name as loses the ability to manage its original DNS ... running in ADAXES. Can I just install the applet on the ADAXES server using powershell?

asked Jan 17, 2023 by stevehalvorson (110 points)
0 votes
1 answer

Hi All, I am currently using the 30 day free trial of Adaxes and seeing if we can use it to achieve our method of user provisioning. I am looking into server-side ... variable value within an SQL query Can this be achieved? Any help is much appreciated, Thanks

asked Feb 1 by Lewis (40 points)
0 votes
1 answer

I would like to set the Hire Date of a user to the CustomAttributeDate2. Using your script to create users from a csv file. I have tried "Hire Date" = " ... for me to get that data into the customAttribute in adaxes? Add something to the script.

asked Jan 10, 2023 by mightycabal (1.0k points)
3,342 questions
3,043 answers
7,765 comments
544,932 users