0 votes

Hello

Is it possible to reference a powershell script placed in a folder somewhere on the Adaxes server, instead of embedding them in each BR and CC ?

I'm planning to install a powershell GUI product, for easy debugging.

- Thanks

by (2.6k points)

1 Answer

0 votes
by (216k points)
selected by
Best answer

Hello,

Yes, there is. To do this:

  1. Add the Run a program or PowerShell script action to your rule, command or task.
  2. Specify the full path to your external script in the Script field, for example: C:\Scripts\MyScript.ps1.

Note however that if you are going to use your product for showing GUI from scripts executed by Business Rules, Custom Commands or Scheduled Tasks, you won't be able to see that GUI. Scripts run as a part of rules, commands or tasks are executed by Adaxes service. In Windows, GUI displayed by services is never shown to users.

As a workaround, for debugging purposes, you can use the $Context.LogMessage method that updates the Execution Log of an operation. The first parameter of the method is the text of the message you want to add; the second parameter is the type of the message. The second parameter can take the following values: "Information", "Warning", and "Error".

Example:

$Context.LogMessage("My message", "Information")

Related questions

0 votes
1 answer

Hello, We have a problem with the way Adaxes detects % as variables in all PowerShell scripts. We are configuring a HTML email template for all out going emails from the system ... this is a start of a variable. Is there anyway around this? Regards, ice-dog

asked Feb 22, 2019 by ice-dog (170 points)
0 votes
1 answer

Hello, I have few business rules for AD account rename to validate input data and make sure username selected is unique in AD, but sometimes it fails with very non-explaining error " ... a "Before updating a User" rule BR14 - is a "Before renaming a User" rule

asked May 14, 2018 by DLe (760 points)
0 votes
1 answer

Hello, I am using a custom task to run PowerShell scripts that migrate users to Office 365. After the initial migration is complete, I'm running a second script ... .Actions.RunScriptAction.Execute(ICommand command) --- End of inner exception stack trace ---

asked Feb 19, 2015 by DFassett (710 points)
0 votes
1 answer

I'd like to log specific details from my scripts but would like to integrate it with Adaxes if possible.

asked Jun 5 by ZoomGhost (280 points)
0 votes
1 answer

Hi all, We currently have a bunch of dial plans that we assign to new users via Adaxes. We updated Adaxes to the latest version, and moved it to a new server before ... value - perhaps this value has been removed/broken in new versions of adaxes? Cheers all.

asked Jan 22 by TheLexicon (200 points)
3,588 questions
3,277 answers
8,303 comments
548,091 users