From 1556a9ca0e19430a7acfbd94b87ae0074975292b Mon Sep 17 00:00:00 2001 From: Craig Gehrig Date: Sat, 8 Oct 2022 11:25:30 -0500 Subject: [PATCH] psexec: add page (#8676) --- pages/windows/psexec.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 pages/windows/psexec.md diff --git a/pages/windows/psexec.md b/pages/windows/psexec.md new file mode 100644 index 000000000..24b7ceede --- /dev/null +++ b/pages/windows/psexec.md @@ -0,0 +1,25 @@ +# psexec + +> Execute a command-line process on a remote machine. +> This is an advanced command and it might potentially be dangerous. +> More information: . + +- Execute a command using `cmd` in a remote shell: + +`psexec \\{{remote_host}} cmd` + +- Execute a command on a remote host (pre-authenticated): + +`psexec \\{{remote_host}} -u {{user_name}} -p {{password}}` + +- Execute a command remotely and output the result to a file: + +`psexec \\{{remote_host}} cmd /c {{command}} -an ^>{{path/to/file.txt}}` + +- Execute a program to interact with users: + +`psexec \\{{remote_host}} -d -i {{program_name}}` + +- Display the IP configuration of the remote host: + +`psexec \\{{remote_host}} ipconfig /all`