0 votes

I am trying to send a $context.logmessage from a condition script in a Scheduled Task but I get nothing in the log. Is this not possible?

Morten A. Steien

by (300 points)

1 Answer

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

Hello Morten,

It is possible to use the $Context.LogMessage method in conditions of a Scheduled Task. However, the message output by the method will not be present in the execution log of any action executed by the Scheduled Task. To see the message in the logs, you need to enable logging of the Execute scheduled task operation which is disabled by default, run the task and then check corresponding log records in the General log (log records for the Execute scheduled task operation are not displayed in the Activity History).

0

Thank you! That fixed my problem.

0

Where do i find the information now? The links are not working anymore and i can't find the informations. Thanks :)

0

Hello,

For details on how to view Adaxes logs, see https://www.adaxes.com/help/ViewOperationsPerformedViaAdaxes. As for changing the list of operations being logged, follow the below steps:

  1. Launch Adaxes Administration console.
  2. In the Console Tree, right-click Logging.
  3. In the context menu, click Properties. image.png
  4. Activate the Log Settings tab.
  5. In the Do not log the following operations section, clear the checkboxes for the operations that should be logged. image.png
  6. Click OK.

Related questions

0 votes
1 answer

If I have a scheduled task powershell script that's targeting an OU of users and in that script I were to call $context.cancel in the case of an error happening for a single ... it cancel the entire scheduled tasks and it won't run for other users in that OU?

asked Oct 18 by wrichardson (20 points)
0 votes
1 answer

seting up a scheduled task to move users to thier correct OU. For some we can do this based on employee type and direct to a specific OU. For most of our users we will have to script this to move to the manager's OU.

asked Apr 12, 2023 by mightycabal (1.0k points)
0 votes
1 answer

Is there a way to have a Scheduled Task with 4 different condition? I want to create a scheduled task start every Monday and the condition see: The next Saturday of the week ... of the week is the fifth of the month then no action Thanks in advance, Simone

asked Jan 18, 2022 by Simone.Vailati (430 points)
+2 votes
1 answer

Most of my PowerShell code is written in VS Code and then copied/pasted to the Adaxes script editor. However, if you use $Context in your scripts, you can't execute them ... = [Context]::new() $Context.LogMessage("foo", "information") Output: [Information] foo

asked Nov 3, 2023 by ngb (290 points)
0 votes
1 answer

Hi, I have this Script to check if a condition is met # The condition is met if $Context.ConditionIsMet is set to $True. $Context.ConditionIsMet = $False $inputString = " ... or issue with this match function using in a "if script returns true" condition?

asked Oct 31 by wintec01 (1.5k points)
3,569 questions
3,259 answers
8,275 comments
547,953 users