PsExec is a command-line tool that allows you to run processes on remote systems. It is often used in network administration and cybersecurity to remotely manage and troubleshoot computers, servers, and other networked devices. Here are some common commands that can be used with PsExec:
psexec \\<computer_name> <command>: This command runs the specified command on the remote computer. For example, psexec \\server01 ipconfig would run the ipconfig command on the remote computer named server01.
psexec \\<computer_name> -i <command>: This command runs the specified command on the remote computer with the user's interactive token. This allows the command to be run with the same privileges as the logged-in user.
psexec \\<computer_name> -s <command>: This command runs the specified command on the remote computer with the system's account privileges. This allows the command to be run with the highest privileges available on the system.
psexec \\<computer_name> -u <username> -p <password> <command>: This command runs the specified command on the remote computer using the specified username and password. This is useful if the remote computer requires authentication to run the command.
psexec \\<computer_name> -d <command>: This command runs the specified command on the remote computer and then immediately exits, leaving the command running in the background.
psexec \\computer cmd: This command opens a command prompt on the remote computer and allows you to enter commands.
psexec \\computer -u domain\username -p password cmd: This command opens a command prompt on the remote computer and logs in using the specified domain and username, and password.
psexec \\computer -s cmd: This command opens a command prompt on the remote computer with the system account privileges.
psexec \\computer -i cmd: This command opens a command prompt on the remote computer and allows you to interact with the desktop of the remote system.
psexec \\computer -d cmd: This command runs the specified command in the background, without opening a command prompt.
psexec \\computer -accepteula cmd: This command runs the specified command, and automatically accepts the End-User License Agreement (EULA) for PsExec.
psexec \\computer -c \\path\to\local\file.exe: This command copies the specified local file to the remote computer and runs it.
It is important to use caution when using PsExec, as it can be a powerful tool that can potentially be misused. Make sure to follow best practices for cybersecurity and only use PsExec for legitimate purposes.