0 votes

My scheduled task works like this (these are my action sets)

  • Condition(s): Account is expired and home drive exists
  • Action The user's home directory gets archived
  • Condition(s): Account is expired and mailbox exists
  • Action: The user's mailbox gets archived
  • Condition(s): A powershell script checks, if the home-archive (file path) exists
  • Action: The user's home will be deleted
  • Condition(s): A powershell script checks, if the pst (file path) exists
  • Action: The user's account gets deleted

My Problem is

The powershell conditionals don't work as expected. I have to start a second run of the whole task to get them working.

I have the apprehension that the variable Context.ConditionIsMet gets declared at the startup/beginning of the whole task, so it gets be set to false since the archive files do not exist at that time.

  • Is that true?

  • How can i get the conditionals to get be checked at the runtime of the action set?

  • I do not want to split the scheduled task into two!

Thanks in avance!

by (20 points)

1 Answer

0 votes
by (270k points)

Hello,

Is that true?

All conditions in all actions sets are checked at the same time before running a scheduled task for an object. This behaviour is by design an cannot be changed.

How can i get the conditionals to get be checked at the runtime of the action set?

Unfortunately, there is no possibility to check conditions based on actions performed in previous sets.

0

Hi and thanks for your fast reply. Is it then possible to trigger a followup task by the scheduled one. I don't find any hint about that.

0

Hello,

It is possible to use a business rule (e.g. triggering After updating a user). They only trigger directly when a certain operation is performed over an object in the specified scope. However, in your case it does not seem to be applicable. Using separate scheduled tasks looks to be the best approach.It is possible to use a business rule. They only trigger directly when a certain operation is performed over an object in the specified scope. However, in your case it does not seem to be applicable. Using separate scheduled tasks looks to be the best approach.

Related questions

0 votes
1 answer

The script create two reports of inactive workstation operating systems. The report is too detailed to run from one of the adaxes reports. Basically how can I set the script up to ... sure How I did this but I can't find it now (probably something simple).

asked Nov 30, 2022 by mightycabal (1.0k points)
0 votes
1 answer

My scheduled task currently: Checks for staff in a particular OU that do not have an O365 license Adds a license Resets their AD Password Moves them to an OU based off ... scheduled task moves them out of the OU that the business rule is looking at. Thanks

asked Apr 15, 2020 by russmerriman (40 points)
0 votes
1 answer

Currently, when I disable a user account in Adaxes, the group memberships of the user remain intact. I'd like to automate the removal of group memberships such as distribution ... a list of groups/DL that the user was previously in and removed from. Thanks!

asked Nov 3, 2021 by jayden.ang (20 points)
0 votes
1 answer

On Approval Requests, in the web console, Initiator shows "N/A" instead of the custom command scheduled task. The admin console shows the custom command scheduled task though. Any way to fix that?

asked Jan 21, 2021 by mark.it.admin (2.3k points)
0 votes
1 answer

I'd like to be able to either send an email report or export a CSV of all of the business rules carried out when a user is disabled. This would be ... Management Activity section but this includes things that weren't part of the disable operation. Thanks

asked Feb 19, 2020 by bavery (250 points)
3,326 questions
3,026 answers
7,727 comments
544,684 users