During a recent administrative task I needed to make a list of all members of a local group on a Microsoft Windows device. Originally I opened up Computer Management and started scrolling through the group. Physically writing down each member would take some time and I prefer the command line approach.

A quick (and quite easy) approach to exporting (the members are not deleted from the group, just their details exported) the members is via the net command:

net localgroup "GROUP_NAME_IN_QUOTES" > FILEPATH\FILE_TO_EXPORT_TO
e.g.
net localgroup "Administrators" > C:\administrators_list.txt

Welcome to GeekTechStuff

my home away from home and where I will be sharing my adventures in the world of technology and all things geek.

The technology subjects have varied over the years from Python code to handle ciphers and Pig Latin, to IoT sensors in Azure and Python handling Bluetooth, to Ansible and Terraform and material around DevOps.

Let’s connect