0 votes

Mainly because we are heavy ActiveSync users, we have a lot of issues with AD Account lockouts. I'd like to have an automated way to detect account lockouts, and take an action (send an email, etc.) based on that condition.

Now, I have a powershell script that I use to check the condition of this, but I can't run the scheduled task in adaxes with enough frequency for it to fire appropriately.

Do you have a way to check for this condition?

by (470 points)
0

Hello,

Please, clarify: do you want to run your script more often than once an our or the issue is that your script does not detect locked account correctly?

0

The script that I have does correctly detect the locked-out accounts. The problem now is that I cannot run the event say, ever 30 minutes.

But, addtionally, if there is already a variable or Adaxes condition for locked status, please avise me so that I can implement this.

1 Answer

0 votes
by (216k points)

Hello,

It is impossible to run a Scheduled Task more often than once an hour. This feature is in our TODO list. Most probably, it will be implemented in Adaxes version 2013.1 that is planned for late January.

As for checking if an account is locked, there is no built-in condition to check if an account is locked, but you can use the If PowerShell script returns true condition for this purpose.

To add such a condition to your Scheduled Task:

  1. Right-click the set of actions and conditions of your Scheduled Task.

  2. Click Add Condition....

  3. Add the If PowerShell script returns true condition and paste the following script:

     $Context.ConditionIsMet = $Context.TargetObject.IsAccountLocked

The script uses the IsAccountLocked property of the user object. As an option, you can use it in your own script, for example:

$isAccountLocked = $Context.TargetObject.IsAccountLocked
if ($isAccountLocked)
{
  # TODO: add some code here.
}
0

Thank you for the response. That is, in effect, what I'm using. So, the limitation is that this can only "fire" on demand when the script is run manually or a maximum of once per day.

0

Joe,

The minimum time interval for a Scheduled Task is once an hour.

0

Starting from Adaxes 2013.1, Schedules Tasks can be set up to run every N minutes.

Also, now you don't need a script to checked whether an account is locked out. Use the If account is locked out / not locked out condition.

0

Perfect! I've already changed the task.

0

How would I check every single user in my AD?

Would I just created a for-each loop...? Would anyone mind posting code that does this?

0

Hello Michael,

The posts in this topic suggest that you create a Scheduled Task. On the final step of the Create Scheduled Task wizard, you are supposed to specify an Activity Scope for the task. A Scheduled Task Activity Scope defines the objects for which the task will be run. If you include All objects in the Activity Scope of a Scheduled Task created per the above instructions, this will mean that the task will run for each user account in your Active Directory. In other words, it will check each user.

Related questions

0 votes
1 answer

Hi, someone noticed this information about account expire of a user yesterday Looking at the attribute itself, I see a mismatch of one day in Adaxes: Compared to AD: The value of ... 10th. Is this a known issue? Or do we need to adjust some setting in Adaxes?

asked Feb 12 by wintec01 (1.7k points)
0 votes
0 answers

When I upgraded to the 2023 code from 2020.1 One of the issues that I saw was when I updated the UPN, the Logon Name also changed with the name change. This is ... attrutes get set the way we prefer as default but then be able to be changed indepentently?

asked Jan 17 by william.malone (80 points)
0 votes
1 answer

When Adaxes runs the command "Deactivate Microsoft 365 account of the user: set Sign-In status to 'Blocked', revoke all licenses" also revoke the sessions in Azure? For reference, it is the "Revoke sessions" button in the Azure portal:

asked Nov 22, 2024 by jmatthews (190 points)
0 votes
1 answer

We have some users who work offsite and rarely authenticate to our local domain controllers but they frequently log into our M365/Entra environment. Will the adm-InactivityDuration ... to check if they are inactive in both local AD and Entra before proceeding?

asked Nov 4, 2024 by smcfarland (60 points)
0 votes
1 answer

I want to add a custom column in a report that displays members of a group that shows the age of the user account in days. Is that possible?

asked Oct 23, 2024 by msheppard (720 points)
3,633 questions
3,321 answers
8,398 comments
548,760 users