Is it possible to create a macro to delete a specific windows user? The problem as I see it is that I can open computer manager and get to the Users, but deleting the correct user doesn't seem possible.
Any ideas?
How to delete a windows user?
Moderators: JRL, Dorian (MJT support)
There probably is some inventive way to go through the Windows interface to get this done, but my first attempt would be to visit a VBScript forum and look for code to delete a user. You might sign up at http://www.visualbasicscript.com and post the question there.
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
What version of Windows Operating System are you usiing?
I believe that you can use NET command with XP/2K and higher.
Untested syntax is something like this:
NET USER username /DELETE /DOMAIN
You will need to have the correct permissions to delete a user.
I believe that you can use NET command with XP/2K and higher.
Untested syntax is something like this:
NET USER username /DELETE /DOMAIN
You will need to have the correct permissions to delete a user.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
Another possibility:
If you're deleting users from a 2003 server you might be able to use the command line tool dsrm.
From microsoft:
If you're deleting users from a 2003 server you might be able to use the command line tool dsrm.
From microsoft:
Dsrm
Deletes an object of a specific type or any general object from the directory.
Syntax
dsrm ObjectDN ... [-subtree [-exclude]] [-noprompt] [{-s Server | -d Domain}] [-u UserName] [-p {Password | *}][-c][-q][{-uc | -uco | -uci}]