0 votes

I'm trying to make a BU to capture user accounts that haven't logged in to AD in 60 days. I have a BU with the following Query, but it isn't working

(&(sAMAccountType=805306368)(Last-Logon-TimeStamp<="%datetime,-2M%"))

Any thoughts? I know I can use a script, but I just thought a BU made sense. This way I can automatically disable those accounts with a scheduled task.

PS. I know I can do this with a script. I just thought it would be easy to do with a BU

Thx!

--Joel

by (470 points)

1 Answer

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

Hello Joel,

No, you can't build a Business Unit that would include disabled user accounts because currently it is impossible to build a LDAP filter that includes the current date.

By the way, there is a built-in Scheduled Task for handling inactive users called Inactive User Deleter. For more information, have a look at the following tutorial: Automatically Deprovision Inactive AD Users.

Related questions

0 votes
1 answer

Hi there, I've a business unit containing all shared mailboxes. In The Admin Console the filter is okay and the affected objects show the accounts: But when ... provide a list of all shared mailboxes (which are disabled aswell). Kind regards Constantin

asked May 28, 2021 by Constey (190 points)
0 votes
1 answer

Is it possible to have a business unit that contains the expired accounts?

asked Sep 14, 2017 by adaxes_user (420 points)
0 votes
1 answer

Hello, Is there a built in method for checking user accounts that have expired in Azure?

asked Jul 31, 2023 by Homelander90 (330 points)
0 votes
1 answer

I have to do a weekly Inactiviy Report for Accounts that have not logged in for 30 days or more. 1 of the reports is for Internal users BUT there is an Account ... Adaxes and working on the product, and i need to get all my reporting done through Adaxes

asked Nov 14, 2022 by dtorannini (80 points)
0 votes
1 answer

I have a specific computer property pattern for three different types of computers, which live in three different OUs and are in three different business units. I will have ... How do I enforce a property pattern for a specific business unit at creation time?

asked Jul 17, 2023 by bennett.blodinger (60 points)
3,351 questions
3,052 answers
7,794 comments
545,118 users