question

Asheliza-7255 avatar image
0 Votes"
Asheliza-7255 asked AnshulKumarMINDTREELIMITED-5501 commented

ADUC Disabled Users Query

Hello,

I am trying to edit a query in ADUC so I can look at users disabled 360 days+. Currently, in the common queries, the number of days can only go up to 180. I was going to edit this query but, the query string shows this message, "The query is valid but will not be shown here because it contains values that must be computed when the query is run." Can someone please advise how to either find the query for editing or create a new query string for this request?

windows-active-directory
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @Asheliza-7255,

I would like to know how things are going on your end. If you have any questions or concerns about the latest information I provided, please don't hesitate to let me know.

It's my pleasure to be of assistance and I look forward to hearing from you.


Best regards,
Hannah Xiong

0 Votes 0 ·

Hi, if the posted answer resolves your question, please mark it as the answer by clicking the check mark. Doing so helps others find answers to their questions.

0 Votes 0 ·

1 Answer

HannahXiong-MSFT avatar image
0 Votes"
HannahXiong-MSFT answered HannahXiong-MSFT commented

Hello @Asheliza-7255,

Thank you so much for posting here.

I have checked in my lab, if we choose 180 under Days since last logon, it will show the message as shown below.

114809-image.png

As for our requirement to query the users disabled 360 days, I found this way and we could test to see whether it helps.

(&(objectCategory=person)(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=2))

(&(whenChanged>=20200401070000.0Z)(whenChanged<=20210501065959.0Z))

Please change the time according to our specific scenario.

114862-image.png

Or it is suggested that we could use powershell to do this query. For more information, we could refer to:
https://social.technet.microsoft.com/Forums/sharepoint/en-US/262deb3d-45a2-418c-b3de-7ffd5f1cfe17/i-need-last-month-or-last-30-days-disabled-users-list-with-name-samaccount-email-diplayname-and?forum=winserverDS

For any question or concern, please feel free to let me know.

Best regards,
Hannah Xiong



image.png (36.7 KiB)
image.png (31.6 KiB)
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @Asheliza-7255,

We are checking in to see if the provided information is helpful. If the reply is helpful, we would greatly appreciate it if you would accept it as answer.

Please let us know if you would like further assistance. Thanks.

Best Regards,
Hannah Xiong

0 Votes 0 ·

This query unfortunately came up with no hits.

0 Votes 0 ·

Hello,

Thank you so much for your kindly reply.

So sorry that this query did not work. I did some research but could not find any useful information about our requirement. If possible, we could use powershell to do the query.

Greatly appreciate your understanding and support.


Best regards,
Hannah Xiong

0 Votes 0 ·