When someone is using a Custom Command, can you detect (WIth PowerShell as Action) "who initiated" the Custom Command?

I found that you can use e.g.: adm-InitiatorFullName to have the full name of the Initiator, is this correct?

Where can we find more info about the object: $Context.Initiator and the properties of this object that are available or are only the %Adm-InitiatorFullname%; ...EMail; ...Dn available?

ago by (40 points)

1 Answer

ago by (16.6k points)
0 votes

Hello,

When someone is using a Custom Command, can you detect (WIth PowerShell as Action) "who initiated" the Custom Command?

Yes, it is possible to get the initiator of the custom command execution. For details, have a look at the corresponding section of the following SDK article: https://www.adaxes.com/sdk/ServerSideScripting/#getting-information-about-the-initiator.

I found that you can use e.g.: adm-InitiatorFullName to have the full name of the Initiator, is this correct?

Yes, you can use calculated properties to get the initiator-related properties. For more details about the available initiator-related calculated properties, have a look at the corresponding section of the following SDK article: https://www.adaxes.com/help/CalculatedProperties/#operation-initiator.

Where can we find more info about the object: $Context.Initiator and the properties of this object that are available or are only the %Adm-InitiatorFullname%; ...EMail; ...Dn available?

Please, have a look at the description of the Initiator property in the following SDK article: https://www.adaxes.com/sdk/ExecuteScriptContextClass/#Initiator_details.

Related questions

I'm trying to run a powershell script that triggers before updating a user, but only run it if the action comes from the self-update web interface. Is that possible?

asked Sep 4, 2025 by jaymallery (60 points)
0 votes
1 answer

Is there a way to get the name of the user who approved a request and supply that to a step inside of a custom command? For example, HR submits a status change for an employee. ... and pass it as a param in a custom command that is called in one of the steps?

asked May 12, 2021 by davfount90 (20 points)
0 votes
1 answer

Here is my issue, When I use this code: $DNs = %param-GroupsInRole% $Groups = $DNs -split "|" %Param-GroupsInRole% can have multiple groups. When setting up the parameter I am ... I just need to be able to do a foreach with the groups picked by the initiator.

asked Mar 23, 2023 by mightycabal (1.2k points)
0 votes
1 answer

I would like to add a parameter for country to a custom command. Since the country has to be entered correctly in order for Active Directory to accept it, I would like to ... ? I didn't find it in the documentation and the sample scripts didn't use parameters.

asked Jun 4, 2020 by mark.it.admin (2.3k points)
0 votes
1 answer

Hi, In the SDK I find information on how to use Powershell to read and create scripts in custom commands and business rules, but I can not find the same for ... information like the embedded scripts for the report and custom columns? -- Morten A. Steien

asked Jul 27, 2023 by Morten A. Steien (300 points)
0 votes
1 answer