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 (130 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 (262k 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

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

asked Jun 29, 2020 by hilmiemrebayat (120 points)
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, 2022 by chappers77 (2.0k points)
0 votes
1 answer

Is it possible to grant selected user option to add custom license plan (or just subset of its licenses) to given user(s) using web interface?

asked Feb 28 by KIT (910 points)
0 votes
1 answer

Hi, Is there a way I can create a rule based group or scheduled task in which the Direct reports of the direct reports are added to a group? So for example: CEO VP's ... in the list that no longer reports to a manager who reports to the CEO. Thanks in advance

asked Dec 22, 2022 by gareth.aylward (180 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)
3,231 questions
2,932 answers
535,365 users