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 (290 points)

1 Answer

+1 vote
by (189k 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 (7k 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 (3.4k points)
0 votes
1 answer

Can you run a powershell to get a Custom Command's ID?

asked Jun 10 by hgletifer (6.8k points)
0 votes
0 answers

When viewing the licensing area of Adaxes, it shows the number of licences being used, and also the limit - ... allowed by license $productInfo = $serviceSettingsContainer.ProductInfo $TotalnumberOfLicensedUsersAllowed = $productInfo.AllowedEnabledUserAccounts

asked Jun 21, 2016 by Martyn (480 points)
0 votes
1 answer

I had a business rules that had a PowerShell script to update User properties in a SQL table. It was working fine. I moved the PowerShell to a custom command so I could ... in the custom command does get the values for the User object. Am I missing something?

asked Jun 2, 2014 by sdavidson (5.1k points)
2,352 questions
2,106 answers
126,651 users