Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NET USER commands...

Status
Not open for further replies.

Neil Toulouse

Programmer
Mar 18, 2002
882
GB
Hi folks

Apologies again if this is the wrong forum, but I am doing this on Windows 7 so thought it would be a place to start :)

From a command line (CMD) if I issue the NET USER command, it returns a list of local users of the machine, in a 3 column format.

If I issue the NET LOCALGROUP command, this shows the groups of the machine but in a list format, ie one entry per line.

Is there a way of forcing the NET USER command to also show the entries in a list (one username per line)?

Thanks
Neil

I like work. It fascinates me. I can sit and look at it for hours...
 
I doubt there is a way to change that behavior (not sure though). But a simple vbscript would do exactly what you want (and maybe more, since your goal is probably doing more than just listing local users one-per-line)

If you are interested in this route, have a look at the script called "Enumerating User Accounts on the Local Computer" on this page:

And if you have questions about it, post in the vbscript forum here: forum329
 
Thanks for the pointer, I will take a look :)

I like work. It fascinates me. I can sit and look at it for hours...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top