0 votes

We have several scripts that use the following action:

$commandID = "{b4b66610-be71-403a-a6b7-8bcf51d200ef}"
$user.executecustomCommand($commandID)

is there syntax that allows you to pass custom command parameters using this method, or is there another way to pass parameters to a custom command through scripting?

by (300 points)

1 Answer

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

Hello,

Yes, it is possible. For details and a script example have a look at the following SDK article: https://www.adaxes.com/sdk/?IAdmTop6.html.

0

What about executing the command asynchronously (similar to the GUI checkbox) from script?

0

Hello,

Unfortunately, there is no such possibility. However, if you enable the Execute asynchronously option for the Custom Command actions, the command will be executed in the script in its turn and the script execution will not wait until the actions are executed.

0

This link is broken now, can we please get an updated link.

0

Hello,

Have a look at the following SDK article: https://adaxes.com/sdk/SampleScripts.ExecutingCustomCommands/.

Related questions

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

I have a number of custom Powershell scripts that add users to Teams, groups, etc. I re-use these scripts dozens of times for different conditions and only change one ... possible to convert this script to a custom command and pass parameters to it instead?

asked 6 days ago by cwyant-hfg (40 points)
0 votes
1 answer

Hello, I'm trying to execute a custom command through a Powershell script, but I'm struggling to pass multiple values to an AD Object Picker parameter. ... , $NULL, $NULL, 0) $obj.ExecuteCustomCommand($command.CommandID, $commandArguments) Thanks in advance!

asked Nov 24, 2021 by KelseaIT (320 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

Hello, we cannot delete users with adminCount=1 with the buildin action "Delete the user" because of missing (adminSDHolder)permission to delete users as ... $identity = "%distinguishedName%" Remove-AdmUser -Identity $identity -Confirm:$False regards Helmut

asked Nov 17, 2020 by a423385 (510 points)
3,588 questions
3,277 answers
8,303 comments
548,090 users