Administration with PsExec

PsTools is a Swiss army knife for many System Administrators. One particular tool we will focus on is called PsExec, which allows you to execute commands on local and remote Windows computers.  

Note: A privileged account such as Domain Admins is required to be able to remotely manage domain-joined computers or run as the SYSTEM account.

To start, download PsTools and extract them to C:\Program Files\PsTools or choose to an alternative path and add an additional environment variable to the location if desired.

Below are some examples on how to use PsExec within an elevated Command Prompt. To Instruct a remote computer to check for Windows Updates:

PsExec.exe \\remotecomputer -s wuauclt /updatenow 

Important: The -s parameter runs in the context as the SYSTEM Account. Use this with caution!

To launch an interactive command prompt of the remote computer locally, much like Enter-PSSession in PowerShell:


PsExec.exe \\remotecomputer cmd

To retrieve the uptime of a remote computer:


PsExec.exe \\remotecomputer systeminfo | findstr "Boot"

To run regedit locally with SYSTEM privileges:


PsExec.exe -s -i regedit