0 votes

Hi,

I'm using a scheduled task that is running everyday to check for accounts that haven't been used for more than 9 weeks.
For some reason there are a couple of accounts that are being notified everyday and I don't know why. The condition I'm using should set the "When Marked Inactive" Attribute only if it's empty but somehow for these few accounts it is doing it everyday.

Any idea why this happens?

Regards
Ingemar

by (960 points)

1 Answer

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

Hello Ingemar,

This happens because of how the When Marked Inactive attribute behaves. The thing is that it is a special attribute introduced for a very specific reason: marking inactive disabled accounts. The property will not be set if an account is enabled. Thus, if the accounts in question are enabled, the When Marked Inactive attribute is not set by your Scheduled Task, and the accounts always meet its conditions.

To workaround the issue, you can use either of the following 2 workarounds:

  • Disable accounts. You can add an action that disables the accounts to your Scheduled Task just before setting the When Marked Inactive attribute.
  • Alternatively, if you don't want to disable the accounts, you can use another attribute to store the date when an account was marked inactive. For example, you can use one of Adaxes virtual properties that can store date/time values, for example, CustomAttributeDate1. Such properties are not stored in AD, but can be used the same as any other attribute of AD objects.
0

Hi,

thanks for your quick response! I changed the task to use CustomAttributeDate1 and it seems to be Ok now.

kind regards
Ingemar

Related questions

0 votes
0 answers

I am creating a new scheduled task and form. We would like to have the ability to schedule the reassignment of a staff member to a different location in the future. ... context, my manager won't necessarily know when he tries to move somebody. Thanks everybody

asked May 21, 2020 by jcalvert (60 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

Hi All, I'm trying to have a scheduled task email the helpdesk a list of machines from AD that have no description. I created a script and it runs the way I want it ... into just one email. Id like to run that in scheduled task if possible. Many thanks, Will

asked Nov 20, 2017 by will17 (330 points)
0 votes
1 answer

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): ... set? I do not want to split the scheduled task into two! Thanks in avance!

asked Apr 7 by lehnen (20 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 by Simone.Vailati (270 points)
2,757 questions
2,491 answers
6,523 comments
1,468,970 users