0 votes

I have a powershell scrip that runs as a Action on a custom command, and this scrip calls the ExecuteCustomCommand PS Function on a user.

Is there anyway i can get the output from the ExecuteCustomCommand and display that back to the user, like it does when i call the main powershell?

$result = $User.ExecuteCustomCommand($command.CommandID, $commandArguments)

And have the result contain the log messages.

by (60 points)

1 Answer

+1 vote
by (279k points)
selected by
Best answer

Hello Justin,

Unfortunately, there is no such possibility as the ExecuteCustomCommand method does not have any return value. As a solution, you can use a separate script in another Custom Command or Scheduled Task that will find required log records and email them to the user. For details on working with log records, have a look at the following SDK article: https://adaxes.com/sdk/AccessingLogRecords.

Related questions

0 votes
1 answer

User received email from Lumifi and wanted to verify if legit or if this is not from Adaxes?

asked Nov 30, 2022 by Jeff.Briand (80 points)
0 votes
1 answer

Hi I've added values to two attributes of an Oraganization Unit: adm-CustomAttributeText1 adm-CustomAttributeText2 I'm trying to extract these properties with a powershell ... But this does not provide the value set in adm-CustomAttributeText1. Any ideas?

asked Jan 28, 2013 by kjesoo (960 points)
0 votes
1 answer

Hello! We are currently trying to use the REST API to search for all group objects in our domain, but the search result is only returning 1000 objects. We tried supplying a ... the request. Is there a way to retrieve more than 1000 objects using the REST API?

asked Feb 16, 2022 by KelseaIT (320 points)
0 votes
1 answer

I'm looking to run a powershell command using a Custom Command that runs after a tech runs through the Transfer request and it will send an email to me showing me the ... username| select name Which will give me all the groups, for that specific user.

asked Jul 21, 2022 by rurbaniak (1.4k points)
0 votes
1 answer

I've got an Adaxes scheduled task that will export records out of AD into a JSON text file. All is working well except for the ability to sort the objects returned ... $exportFile "`n]" $Context.LogMessage("Total records written = " + $count, "Information")

asked Sep 11, 2015 by sandramnc (870 points)
3,434 questions
3,130 answers
7,984 comments
546,353 users