- November 8, 2017
- Posted by: Syed Shujaat
- Category: Uncategorized
Adding Machine Local Admin User Group remotely
If you are domain Admin or have local admin rights on the target machine :
Note: you will need to install PSTools which can be obtained from https://docs.microsoft.com/en-us/sysinternals/downloads/psexec
psexec \\computername cmd.exe
net localgroup administrators domain\username /add
If you’re not an Admin of the Targent PC , run the following command
net use \\computername\ipc$ /username:computername|domain\administrator
Supply the password when prompted.Just be aware that psexec sends passwords in clear text!
Then run the following commands.
psexec \\computername cmd.exe !!Computername is your target machine
net localgroup administrators domain\username /add !! provide your Domain/useraccountname