This is the website of an IT geek, technologist, freelance writer, photographer, musician, rock climber, classic mini enthusiast, iPad and Mac zealot.
You have been warned.

How To Add a Windows User from the Command Line

Submitted by daemonchild on Wed, 2011-09-14 - 16:15
daemonchild's picture

To list the local users and groups:

net use
net localgroup
net localgroup (groupname)

It's always worth a look at what is already in place locally - you might be abel to use what is there to assist you.

To create a new user locally:

net user (name) (password) /ADD

Then we want to add this user to the Administrators and Remote Desktop Users groups to aid a more interactive GUI login:

net localgroup Administrators (name) /ADD
net localgroup "Remote Desktop Users" (name) /ADD

If the server is a member of a domain, we can go a step further and add a domain level user rather than a local one. Now, this will have more reach within the organisation that a local user will, but it will also be much more visible to the IT team of the organisation that you're testing.

net user (name) (password) /ADD /DOMAIN
net localgroup Administrators (name) /ADD /DOMAIN
net localgroup "Remote Desktop Users" (name) /ADD /DOMAIN

Tags: 
Hello