Skip to main content

How to add user to local administrators from command line remotely

Sometimes, you need to add user to local administrators from command line, especially if you're doing this remotely.
It's an easy process when you are using old, dusty net command.

Check adminstrators group members :
net localgroup administrators

To add contoso.com\john to local administrators::
net localgroup administrators /domain contoso.com john /add