Published: 2013-Sep-07 17:37

Windows 7 adding admin user cmd command line

net user alexx passphrase /add
net localgroup administrators alexx /add
net user alexx /active:yes

but if your laptop is in french then the second command is:

net localgroup administrateurs alexx /add

est pour windows 7 en france.

Change "alexx" to the user that you want to add and passphrase to your own super-secret passphrase.

I found this when I was asked to repair a windows7 laptop that had only one admin user and trying to log in gave:

"Echec de l'ouverture de session par le service Service de profil utilisateur. Impossible de charger le profil d'utilisateur."

Interestingly I could reboot, (hammering F8) and boot into safe mode and then logging in as the admin worked fine.

This enabled me to add an additional admin user to repair the other one. had an interesting suggestion but in the end I just changed the name of the problem account, (which didn't match the underlying C:\Users\{username}) and created a new account with the old name. Then I copied all of the files over, and once the owner was happy I showed them where their "back up" was and how to install SpiderOak, (because like far too many people, they had no back up at all.)

 If they come back I'll move them to Mint Linux, (they aren't ready for the power of Crunchbang.)

[0] found on
Also could have been useful, had they forgotten their password. ( is another walk-through of the windows password reset.)