It is assumed that you have a privileged account (read - domain admin) to be able to grant local admin privileges on servers. You will require psexec from sysinternals.
C:\Windows\system32>psexec \\TestServer cmd
PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals - www.sysinternals.com
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
Confirm we are connected to the correct server.
C:\Windows\system32>hostname
Testserver
Now issue the command to grant local admin privileges and exit the server.
C:\Windows\system32>net localgroup administrators corp\jeremy /add
The command completed successfully.
C:\Windows\system32>exit
cmd exited on testserver with error code 0.
Comments