psexec: add page (#8676)

pull/1/head
Craig Gehrig 2022-10-08 11:25:30 -05:00 committed by GitHub
parent f64c693299
commit 1556a9ca0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 25 additions and 0 deletions

25
pages/windows/psexec.md Normal file
View File

@ -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: <https://learn.microsoft.com/en-us/sysinternals/downloads/psexec>.
- 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`