Skip to content

Powershell – How to create local Administrators – Windows 7 – Server 2012 R2


If you have local access to a machine you have total control over it.  Here we create a new user and assign it to the local “Administrator” group – to gain local Admin rights.  Use “computer management” to view local users and groups.

Step 1 – Create a user in powershell

net user IT Skyisblue2015 /ADD

  • net user
  • user name to create (IT)
  • password to set (Skyisblue2015)
  • /ADD

We can view the new account using the command

net user IT

local view the new IT account

This defaults to the local “users” groups – and we want to be admin.

Administrators is a default local group – which you can view under “Computer Management”.

Here we see the Administrators group now contains our new “IT” user.. excellent!!  But how did I do that?

local administrator successfully added

Step 2 – Escalate to Admin

net localgroup Administrators IT /add

  • net localgroup
  • name of group (we want Administrators)
  • name of object or user to add to group (IT)
  • /addlocal admin add a user to administratorslocal 2 groups

Step 3 – Delete the user to cover your tracks

net user IT /delete

  • net user
  • Name of user (IT)
  • /Delete

local user delete

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: