Link to home
Start Free TrialLog in
Avatar of biplabmukherjee
biplabmukherjeeFlag for India

asked on

VBfScript for Identifing Inactive A/c In AD

can you guys help me to create the VB script for identifing the Inactive A/c from Active Directory. Have testing DSquery & other tools but not 100% satisfied in terms of report. If you guys help me to create a VB script only for Identifying the inactive A/c it will be great help for me.

Thanks

Biplab
Avatar of Chris Dent
Chris Dent
Flag of United Kingdom of Great Britain and Northern Ireland image


I know it's not VbScript, but it does give very pretty reports in the format of your choosing:

http://www.joeware.net/freetools/tools/oldcmp/index.htm

And despite the name it does work for User accounts as well as computers.

It shows details of every attribute which can be used to determine activity. Choices of reporting format include HTML and CSV.

Chris
Avatar of biplabmukherjee

ASKER

Ok can we create VB script? or Do you have any idea from where I can get this. I would like to go with VB script.

Which fields do you want to use for inactivity? What functional level is your domain?

Chris
Domain functional level is Win2003 & inactivity interms of Users ( login & logout time )

Okay, then the most useful are:

lastLogon
lastLogonTimeStamp

lastLogon is accurate, but not replicated which means every DC must be queried.

lastLogonTimeStamp is replicated which makes for quick queries, but can be up to 14 days out of date.

If you're looking at inactivity in terms of months that 14 days is fairly inconsequential. Happy with lastLogonTimeStamp?

Chris
Yes with Lastlogon TimeStamp & just for FYI I am looking for inactivity in terms of months.

Thanks
Biplab

Cool, okay, won't be a sec!

Chris
ASKER CERTIFIED SOLUTION
Avatar of Chris Dent
Chris Dent
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Chris, I will test & will update you by tommorow.

Many Thanks,

Biplab
sorry for the late response. Could you please provide me sample report. after running this script what output will come?

Thanks in advance

after executing this script it would create the file but it doesn't conatin any data in it. Can you please confirm me .

Thanks,

Biplab