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 (286k 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.

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

Hello! how do i manage do get adaxes to remove all groups from the user after one month? We have a Business Rule where you can add an end of Date when the Account ... value field the powershell script works but not with the +1 Month. Thanks for your help!

asked Jun 14, 2023 by eww ag (140 points)
3,519 questions
3,210 answers
8,187 comments
547,579 users