rss logo

Manage a Windows Home Edition in a Active Directory environment

It's pretty rare but we still could find Microsoft Windows Home Edition inside enterprises networks. As we cannot add them to Active Directory and in order to make them able to work, we still can make them access to windows shares.

The commands

net use X: \\\share user_password /USER:domainame\my_user /PERSISTENT:YES cmdkey /add: /user:my_user /pass:domainame\user_password net user admin_account AdminPass! /add WMIC USERACCOUNT WHERE Name='admin_account' SET PasswordExpires=FALSE net localgroup administrators admin_account /add

Script it

We can write a .bat file in order to automatize this.

@echo off set USER=domainame\user01 set PASSWD=MyUser01Password net use X: \\\share %PASSWD% /USER:%USER% /PERSISTENT:YES net use Y: \\\scans %PASSWD% /USER:%USER% /PERSISTENT:YES cmdkey /add: /user:%USER% /pass:%PASSWD% net user admin_account AdminPass! /add net localgroup administrators admin_account /add


Password escape characters

If you want to use special characters for your users passwords you have to know that you may need escape characters.

Character Escape Sequence
> ^>
& ^&
" \"
< ^<
| ^|
^ ^^


net user admin ^>^&\"^|asword /add
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Contact :

contact mail address