Query Active Directory, Upcoming Expired Accounts

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
 
J

Jerold Schulman

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
 
B

blexmark

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?
 
B

blexmark

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top