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 (216k 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
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)
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 (350 points)
0 votes
1 answer

Using the powershell module, I know how to create a scheduled task, and also how to bind to a scheduled task that is already known. I also have used code to try creating ... same time as another. These are all one-time tasks and will be removed once executed.

asked Jan 19 by aweight (40 points)
3,326 questions
3,026 answers
7,727 comments
544,679 users