0 votes


i have an powerhell variable that contains a hashtable. Is there a way to add the content of this hashtable to an adm-CustomAttributeTextMultiValue of a user?

I tried the following, but it's not working:

Set-ADmUser -identity $sam -add @{"adm-CustomAttributeTextMultiValue1"=$hashtable} -AdaxesService localhost

Thanks for your assistance!

by (110 points)


Unfortunately, it cannot work like that as each value of a multi-valued attribute must be a string. Could you, please, provide us with an example of the hash table you have and how exactly you need to save values to adm-CustomAttributeTextMultiValue1?

Also, please, specify where the script will be executed (e.g. in a custom command, outside of Adaxes, etc.).



i would like to use it in a custom command.

The hash table looks somehow like this:

Name                           Value
----                           -----
UserPrincipalName              user@domain.com
TwoWayVoiceMobile              False
DisplayName                    User, Name
PhoneAppNotificationIsDefault  True
PhoneAppOTP                    False
AuthPhoneNumber                +49 160 1234567
PhoneAppOTPIsDefault           False
PhoneDeviceName                {iPhone, iPhone}
ObjectID                       as04654-sdd-e104-0815-4711
PhoneAppNotification           True
State                          Disabled
TwoWayVoiceMobileIsDefault     False
OneWaySMSIsDefault             False
OneWaySMS                      True

It would be nice to have it in the CustomAttributeTextMultiValue1 row per row with Name: Value., i.E.:

UserPrincipalName:  user@domain.com
TwoWayVoiceMobile:  False
DisplayName: User, Name

Thanks a lot



Thank you for the provided details. For us to help you with a solution, please, provide the full script you are using in TXT format.

1 Answer

0 votes
by (233k points)


In case if you have a general hash table (e.g. specified in a script variable), you can use the below script to save the key-value pair from the table into an Adaxes custom multi-valued attribute.

$hashTable = @{
    "key1" = "value1";
    "key2" = "value2";
    "key3" = "value3";

# Convert hash table into array
$array = $hashTable.GetEnumerator() | %% {"$($_.Key): $($_.Value)"}

# Update the target user
$Context.TargetObject.PutEx("ADS_PROPERTY_UPDATE", "adm-CustomAttributeTextMultiValue1", $array)

Related questions

0 votes
1 answer

Hi We need to generate random employee numbers for test accounts, but these need to be between 80000 & 90000 to ensure they are identified as test. Is it possible to do this using just the %adm-RandomInteger% value reference? Thanks Matt

asked Mar 8 by chappers77 (1.4k points)
0 votes
1 answer

Dear Can I use more than ten adm-CustomAttributeTextMultiValue in Adaxes? Sincerly

asked Jun 29, 2020 by hilmiemrebayat (120 points)
0 votes
1 answer

Hello, With your tool, is there a way to Bulk modify Users by adding the SAMAccountName to the CN/Displayname i.E %LastName%, %FirstName%, %(SAMAccountName)% In ... (Fred Stokes), for both CN and DisplayName Stokes, Fred (SAMAccountName) Regards, Enrico

asked Nov 20, 2018 by EnricoM (50 points)
0 votes
1 answer

Hi Guys, You probably already met with a similar problem in your organization. Communications Department has dozens of distribution groups, that need to be updtaed base on some ... do the job. Maybe you can share some better solution to achieve same goal.

asked Mar 9, 2015 by axmaster (510 points)
0 votes
1 answer

I had a script that would copy the values from adm-CustomAttributeTextMultiValue1 and save them into extensionAttribute15 as a comma seperated list. The script somehow got deleted and I can't seem to find the tutorial I used to create it before.

asked Jul 1 by jordan (110 points)
2,880 questions
2,600 answers
114,601 users