0

How can I delete a user from the command line?


I am just starting working at a college and I'm inheriting a unintelligible mismash of local and domain accounts across a span of computers ranging from XP to Windows 8.

with upwards of two thousand computers that need to be gone through and remove anywhere between no and 5 local users accounts (so that people will start actually using their domain counterparts)

I've seen people saying net user username /del which apparently misses possibly some stuff in the registry and doesn't remove the folder for C:\users\username either

I've seen people recommending DelProf2 which seems like it would get the job done, and has some filters, but has no way for me to specify which accounts to leave or delete other than direct interaction or filtering based on time (which won't work because I am changing the account they should be using) Also, I would prefer to stay away from downloading and running a file on all of the computers and stick to regular commnands/vbscript/powershell/stuff

Most of the computers have either one or two local accounts that I would want to remove. The rest I would want to spit out to a file for my manual review (some of them have been embedded in systems and would need undoing by hand) but I can worry about that part in the script I'll be writing.

I am looking for a command line way or a set of steps to delete a given user. If doing net user username /del and then deleting the relevant registry keys is that, then please give some sources.

djsmiley2kStaysInside
  • 6,943
  • 2
  • 36
  • 48
PsychoData
  • 1,447

0 Answers0