Feeling lost here, because using the exact syntax from example #4 here gives me a Set-AdmObject: One or more input parameters are invalid error when I try to pass an array of values:

$values = "value1", "value2"
Set-AdmObject -Identity <guid> -Replace @{adm-CustomAttributeTextMultiValue2=$values}

If I pass it a single string, it works as expected:

$value = "value1"
Set-AdmObject -Identity <guid> -Replace @{adm-CustomAttributeTextMultiValue2=$value}

Adaxes Version 3.16.21906.0

by (360 points)

1 Answer

by (308k points)
–1 vote

Hello,

Your approach is incorrect as $values is actually not an array like in the examples you referenced. To achieve the desired, you can change the variable definition as follows:

$values = @("value1", "value2")
by (360 points)
0

So both are perfectly valid ways of creating an array. The @() syntax coerces single values into arrays.

$values = "value1","value2"
$values.GetType()

IsPublic IsSerial Name                                     BaseType
-------- -------- ----                                     --------
True     True     Object[]                                 System.Array

Related questions

Let's say that I have a scheduled task that adds a high-level roles-based AD group to a user. As part of that same task, I'd like to run a powershell script to collect all ... the task to type in the "parent" group name, and pass it to the script that way?

asked Sep 22, 2025 by 3Jake (210 points)
0 votes
1 answer

Hi, I need to start Adaxes scheduled task from Powershell console running on another host. How can I do that?

asked May 21, 2020 by KIT (1.1k points)
0 votes
1 answer

Hi I've added values to two attributes of an Oraganization Unit: adm-CustomAttributeText1 adm-CustomAttributeText2 I'm trying to extract these properties with a powershell ... But this does not provide the value set in adm-CustomAttributeText1. Any ideas?

asked Jan 28, 2013 by kjesoo (960 points)
0 votes
1 answer

Hello Adaxes Support, I couldn't find a script to enable MessageCopyForSentAsEnabled for a shared mailbox, do you have a script for me to do that?

asked May 22, 2024 by dominik.stawny (280 points)
0 votes
1 answer

When trying to set "Accept Messages" to "All senders" on distribution group through Adaxes web interface I get error: Adaxes doesn't have any permissions to ... of mentioned role? I tried give it msExchRequireAuthToSendTo permission but that didn't help.

asked Dec 1, 2022 by KIT (1.1k points)
0 votes
1 answer