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 (270k 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.

Related questions

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, I believe I've come across a bug in 2019.1. When working inside a custom command with two parameters, I'm trying to add conditions to an Else if statement that look ... but not inside an else if statement. Any thoughts on how to make this work? Thanks!

asked Jun 28, 2019 by ryan_breneman (920 points)
0 votes
1 answer

Hi, I followed this example: https://www.adaxes.com/sdk/IAdmTop6.html, but because the Custom Command is disabled, I get the following error message: System.Management.Automation ... if I enable the Custom Command. I am using Adaxes 2018.2 Best Regards Martin

asked Feb 19, 2020 by Martin (100 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,326 questions
3,026 answers
7,727 comments
544,684 users