Jump to content


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


Server 2012 export localgroup to txt file showing only users no additional info

  • Please log in to reply
2 replies to this topic

#1 semipro1337


  • Members
  • 3 posts
  • Local time:05:00 AM

Posted 11 April 2016 - 07:47 PM

Hello everyone, have kind of a odd request from a teacher, every 6 months they need to do a mass change of about 600 user passwords.


We have a teachers that log in the students remotely when they sit down at a pc, all of the accounts use the same password, wich the student never knows - only the teachers.


Before I get any security advice, this is not a typical environment - lets just say its a place for people who did things they shouldnt have and are now long term guests, so its easier if they dont know passwords and log themselves in, they would share them with each other and we cant have that at all. In any other type of environment this would be ill advised. We also cant have teachers try to remember a different password for each student so here we are. With that being said...



I already have a batch file in place that I use to change the passwords, I export the list of users in a specific local group using net localgroup "mygroupname" > groupusers.txt, manually edit the lines I do not want then run a batch that changes the passwords and that works great.....


One time I found a command that would redirect only the users and no other information, I cant find it anywhere and I could of sworn I saved it in a document in google drive.



I am hoping someone can provide the command (standard command line only, no VBS, powershell, etc).


Right now I export the list and manually edit the lines I do not want, but I want to give this responsibility to a dedicated admin from now on, so I need to dumb it down as much as possible. I have noticed where I work, being a teacher doesnt mean they know the difference between a mouse and the monitor (in some cases).


Thanks in advance.

BC AdBot (Login to Remove)


#2 JohnnyJammer


  • Members
  • 1,117 posts
  • Gender:Male
  • Location:QLD Australia
  • Local time:09:00 PM

Posted 11 April 2016 - 10:39 PM

I think you mean dsadd, dsquery etc https://technet.microsoft.com/en-au/library/cc778414%28v=ws.10%29.aspx

#3 sflatechguy


  • BC Advisor
  • 2,244 posts
  • Gender:Male
  • Local time:07:00 AM

Posted 24 April 2016 - 09:06 AM

Are these local user accounts on the computer(s), or domain accounts? I ask because "net localgroup" can be used to manage both.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users