Professional Documents
Culture Documents
On Windows computer we can add users to a group from command line too. We can use net
localgroup command for this
For example to add a user to administrators group from command line we can run the below
command. In the below example I have taken username as John.
This command works on all editions of Windows OS i.e Windows 2000, Windows XP, Windows
Server 2003, Windows Vista and Windows 7. In Vista and Windows 7, even if you run the above
command from administrator login you may still get access denied error
The solution for this is to run the command from elevated administrator account. See How to open
elevated administrator command prompt
When you run the 'net localgroup' command from elevated command prompt: