Solved

deleting old Computer accounts 2000/2003 domain

Posted on 2004-09-23
4
250 Views
Last Modified: 2010-04-17
Does anyone have the following code in VB6?

1.  Code that will delete a computer account

2. Code to list computer account updated dates to find old accounts


0
Comment
Question by:bluedragon99
4 Comments
 
LVL 22

Accepted Solution

by:
cookre earned 250 total points
ID: 12134394
Well, it's VBScript, not VB6, but it translates easily:

Delete account:
http://www.microsoft.com/technet/community/scriptcenter/user/scrug13.mspx

Alas, I can't find a most recent update date for user accounts.
0
 

Assisted Solution

by:waitandsee123
waitandsee123 earned 250 total points
ID: 12150551
In question 2. Code to list computer account updated dates to find old accounts

Would the last logon date and time be an acceptable substitute for account update dates?

If so, and if you can get the value from a command shell command, you can call out the net user command for local accounts.

net user "whateverusername" | find /i "Last Logon"

OR for domain user accounts

net user "whateverusername" /domain | find /i "Last Logon"

Then just parse the strings into the data you want to retrieve.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now