0 votes

Is there a way to configure a Custom Command parameter to accept multiple values so I can then add them to a multi value attribute such as adm-CustomAttributeObjectMultiValue1-5?

As you might be able to interpret in my specific case I'm looking to use a directory object picker parameter

by (50 points)

1 Answer

0 votes
by (14.5k points)
selected by
Best answer

Hello,

Yes, it is possible. First of all, you need to configure the Directory object picker parameter to allow multiple selection. The parameter values can be assigned to a multi-valued property using a PowerShell script only. For example, you can use the below script executed in the Run a program or PowerShell script action. In the script:

  • $paramName – Specifies the name of the Directory object picker parameter. The name must start with the param- prefix.
  • $valueSeparator – Specifies the parameter value separator. Must be the same as specified in the parameter configuration.
  • $propertyName – Specifies the name of the custom object multi-valued property (e.g. adm-CustomAttributeObjectMultiValue1).
$paramName = "param-MyParameter" # TODO: modify me
$valueSeparator = ";" # TODO: modify me
$propertyName = "adm-CustomAttributeObjectMultiValue1" # TODO: modify me

$paramValues = $Context.GetParameterValue($paramName).Split($valueSeparator)

$Context.TargetObject.PutEx("ADS_PROPERTY_UPDATE", $propertyName, $paramValues)
$Context.TargetObject.SetInfo()

To allow multiple selection for the parameter:

  1. Launch the Adaxes Administration console.
  2. In the Console Tree, expand your service node.
  3. Navigate to and select the custom command.
  4. In the Result Pane on the right, activate the Parameters tab. image.png
  5. Select the required parameter and click Edit. image.png
  6. Activate the Configuration tab and then click Configure in the Object Selection section. image.png
  7. Select the Allow multiple selection checkbox and click OK. image.png
  8. Specify a value separator (e.g. semicolon) in the corresponding field. Make sure to use a character that can never be present in an object DN. image.png
  9. Click OK and save the changes.
0

Thank you very much

Related questions

0 votes
1 answer

Hi, I'm working on my "account lifecycle" review processes and have a new area that I'm starting to think about. When staff who are also managers (of both users ... use! I appreciate there are some complex questions in here, so don't prioritise! Many Thanks

asked May 30, 2013 by firegoblin (1.6k points)
0 votes
1 answer

We've the following script we want to use in Adaxes to create as part of user creation, to ask if the user will need a AWS workspace, then asks employeetype for different ... "Error") exit(-1) } else { $Context.LogMessage("Created workspace", "Information") }

asked May 3 by Plusa (20 points)
0 votes
1 answer

We are wanting to display all values entered into a multi value text attribute in an email sent by Adaxes. What we've found is that only the first entry into the array ... Entry" Is there a way to reference the variable so that it displays all entries? Thanks

asked 6 days ago by msheppard (610 points)
0 votes
1 answer

Dear support, I'm trying to automate network share creations via custom commands. They idea is to create share and groups with command A and schedule ... "ADS_SCOPE_BASE" $scopeItem.Exclude = $False $scopeItem.SetInfo() $task.ActivityScopeItems.Add($scopeItem)

asked Jan 27, 2020 by Dmytro.Rudyi (920 points)
0 votes
1 answer

We have several scripts that use the following action: $commandID = "{b4b66610-be71-403a-a6b7-8bcf51d200ef}" $user.executecustomCommand($commandID) is there syntax that allows ... is there another way to pass parameters to a custom command through scripting?

asked Jul 11, 2019 by ggallaway (300 points)
3,587 questions
3,275 answers
8,300 comments
548,052 users