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 (222k 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

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 by KelseaIT (320 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 (790 points)
0 votes
0 answers

It would be great if we could run a report on an OU and get the following information: Computer Name Local Accounts Whether or not the account is an administrator ... this is less important. Thanks in advance. Your support team is great and appreciated.

asked Sep 8, 2021 by mikek (80 points)
0 votes
1 answer

Let's say I have a Business Rule that is fired prior to adding members to a group. Is it possible to get the number of objects being added to that group as ... that tells me that 6 objects will be added or is each added user treated completely independently?

asked Apr 20 by ngb (90 points)
2,757 questions
2,491 answers
1,468,999 users