SysInternal tool using Psexec

Sometimes users need elevated access to a server to load software or some other reason. I do this remotely, and so can you. First, you need Mark Russinovich’s (now Microsoft’s) Sysinternal Tools (you should keep these on a thumb drive in your pocket and on your computer). You can download the suite of products here:

Once the tools are downloaded, add this to the path via your computer’s Environment Variables.

In this scenario, we are adding user “user01” to the local Administrator’s Group on a server named srv01.

Then, from the cmd prompt, enter the below command and hit enter:
c:\>psexec \\srv01 cmd

The return will be something like this:

PsExec v1.97 – Execute processes remotely
Copyright (C) 2001-2009 Mark Russinovich
Sysinternals –

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

This opens a remote cmd shell on that server at “C:\Windows\System32.
Next, enter this:

c:\Windows\system32>net localgroup administrators yourdomain\user01 /add

The return is:
The command completed successfully

Then close the connection:

The return is:
cmd exited on  srv01 with error code 0