We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

VBfScript for Identifing Inactive A/c In AD

biplabmukherjee
on
Medium Priority
266 Views
Last Modified: 2012-05-07
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
Comment
Watch Question

Chris DentPowerShell Developer
CERTIFIED EXPERT
Top Expert 2010

Commented:

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

Author

Commented:
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.
Chris DentPowerShell Developer
CERTIFIED EXPERT
Top Expert 2010

Commented:

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

Chris

Author

Commented:
Domain functional level is Win2003 & inactivity interms of Users ( login & logout time )
Chris DentPowerShell Developer
CERTIFIED EXPERT
Top Expert 2010

Commented:

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

Author

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

Thanks
Biplab
Chris DentPowerShell Developer
CERTIFIED EXPERT
Top Expert 2010

Commented:

Cool, okay, won't be a sec!

Chris
PowerShell Developer
CERTIFIED EXPERT
Top Expert 2010
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
Thanks Chris, I will test & will update you by tommorow.

Many Thanks,

Biplab

Author

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

Thanks in advance

Author

Commented:
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
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.