I need a full list of local users defined on a Windows Server 2003. It is not a part of an AD domain. I have found typing "NET USER" on the command line lists all users, but it does not include the Description or Full Name field, which I need. I can't find any command line option for it either.
It doesn't HAVE to be command line. The clue is I need to copy-paste the data into a processable format. The Computer Manager console is not a fan of copy pasting.
Best Answer
Copy this into a .JS file.
VB example: On Error Resume Next Set objWMIService = GetObject("winmgmts:\.\root\cimv2") Set listLocalUsers = objWMIService.ExecQuery("Select * from Win32_UserAccount Where LocalAccount = True")
Then run it using
cscript myGetLocalUsers.js
orcscript myGetLocalUsers.vb
at the command prompt.Edit:
I haven't tested it so let me know if you get any errors.