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 (228k 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 (850 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 (50 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)
0 votes
1 answer

Is it possible to reset a password and force the user to change password at next login within the same action of a custom command? When they are split out into ... like to request this functionality be added to the reset password action in the future.

asked Mar 20, 2020 by yourpp (530 points)
2,807 questions
2,541 answers
6,615 comments
65,145 users