Query Active Directory, Upcoming Expired Accounts

  • Thread starter Thread starter blexmark
  • Start date Start date
B

blexmark

I was asked by my director today to see if I can query active directory
to determine who's (contractor) accounts will expire in the next two
weeks .

He would like to get this list of expiring users and contact the
contractor's points of contact so we can determine if we need to extend
the life of these accounts.

QUESTION: Does anyone know the query syntax to search for accounts
expiring in the next 14 days in active directory?


Thanks so much,

Kyle Brumbaugh
 
I was asked by my director today to see if I can query active directory
to determine who's (contractor) accounts will expire in the next two
weeks .

He would like to get this list of expiring users and contact the
contractor's points of contact so we can determine if we need to extend
the life of these accounts.

QUESTION: Does anyone know the query syntax to search for accounts
expiring in the next 14 days in active directory?


Thanks so much,

Kyle Brumbaugh


See tip 8665 » How can I report all user accounts that will expires in the next N days? 10-Nov-04
and links in the 'Tips & Tricks' at http://www.jsifaq.com

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
http://www.jsifaq.com
 
Thanks Jerold!

I admit that's exactly what I was looking for.

My problem has been since I got these batch files is I'm not entirely
sure how to use the syntax to get the correct output. I've created each
batch file and placed it in the same folder.

when I perform the following command:
<directory of expires.bat>\expires14 /X

I recieve the following output:

'cvtfiletime' is not recognized as an internal or external command,
operable program or batch file.

and when I perform this command:

<directory of expires.bat>\expires 14

I recieve the following output;

'cvtfiletime' is not recognized as an internal or external command,
operable program or batch file.

and I get several accounts as well...

Although the one I checked actually expired on May 20, 2006 when it's
Feb 22, 2006.

Anyone else having this problem?
Do I need to look at different input? What about the other scripts,
maybe something wrong with them?
 
Update: Search for cvtfiletime.bat on the http://www.jsifaq.com
website.

It was missing a batch file to put in the folder which had not been
listed on the Expires Tips Page.

Thanks all for the help!!!

Kyle
 
Back
Top