- Contents in this wiki are for entertainment purposes only
Power Tools:PsExec.exe: Difference between revisions
XenoEngineer (talk | contribs) m (1 revision imported: Created by Gemini 2.5 (Pro?)) |
XenoEngineer (talk | contribs) mNo edit summary |
||
| Line 1: | Line 1: | ||
<div style="background-color:aEGreetings!; border:1px outset azure; padding:0 20px; max-width:860px; margin:0 auto; "> | |||
{{ToolInfo | {{ToolInfo | ||
| Name = PsExec | | Name = PsExec | ||
| Line 50: | Line 51: | ||
PsExec is a powerful tool that should be used responsibly. Running processes with elevated privileges or on remote systems can have significant security implications. Always ensure you understand the commands you are executing and the potential impact on target systems. Avoid hardcoding passwords directly in scripts; use secure methods for credential management. | PsExec is a powerful tool that should be used responsibly. Running processes with elevated privileges or on remote systems can have significant security implications. Always ensure you understand the commands you are executing and the potential impact on target systems. Avoid hardcoding passwords directly in scripts; use secure methods for credential management. | ||
</div> | |||
Revision as of 11:31, 26 January 2026
| Name | PsExec |
|---|---|
| Description | Execute processes remotely |
| Latest Version | 2.40 (as of Jan 2024, check official site for latest) |
| Author(s) | Mark Russinovich |
| Category | Process Management, Remote Administration |
PsExec is a lightweight telnet-replacement that lets you execute processes on other systems, complete with full interactivity for console applications, without having to manually install client software. Its most powerful feature is that it can run programs on remote systems using the remote system's console.
Usage
psexec [\computer[,computer2[,...] | @file] [-u user [-p psswd]] [-n s] [-l] [-s | -e] [-x] [-i [session]] [-c [path]] [-f | -v] [-w directory] [-d] [-<priority>] [-a n,n,...] <program> [arguments]
Common Parameters
-a: Separate processors on which the application can run with commas where 1 is the lowest numbered CPU.-c: Copy the specified program to the remote system for execution. If you omit this option PsExec will look for the program in the remote system's path.-d: Don't wait for process to terminate (non-interactive).-e: Does not load the specified account's profile.-f: Copy the specified program to the remote system even if the file already exists.-i: Run program so that it interacts with the desktop of the specified session on the remote system. If no session is specified the console session is used.-l: Run process as limited user.-n: Specifies timeout in seconds connecting to remote computers.-p: Specifies optional password for user name. If you omit this, you will be prompted to enter a hidden password.-s: Run remote process in the System account.-u: Specifies optional user name for login to remote computer.-v: Copy the specified program to the remote system only if it has a higher version number or is newer than the one on the remote system.-w: Set the working directory of the process (on the remote system).-x: Display the UI on the Winlogon desktop (Local System only).program: The name of the program to execute.arguments: Arguments to pass to the program.
Examples
- Launch a remote interactive command prompt:
psexec \remotecomputer cmd.exe
- Run a process in the System account:
psexec \remotecomputer -s cmd.exe
- Execute a program on multiple remote computers:
psexec \computer1,computer2,computer3 -u admin -p password ipconfig
- Copy and execute a local program on a remote computer:
psexec \remotecomputer -c C:\Path\To\MyProgram.exe -d
- Run a program with a timeout of 10 seconds:
psexec \remotecomputer -n 10 myprogram.exe
Security Considerations
PsExec is a powerful tool that should be used responsibly. Running processes with elevated privileges or on remote systems can have significant security implications. Always ensure you understand the commands you are executing and the potential impact on target systems. Avoid hardcoding passwords directly in scripts; use secure methods for credential management.