Does anyone know, how to disable "copyright header" from appearing when running PSExec? Everutime I run "./psexec ..." command I see this message:
PsExec v2.11 - Execute processes remotely
Copyright (C) 2001-2014 Mark Russinovich
Sysinternals - www.sysinternals.com
It's really annoying and it bloats up output of my script.
Thanks
Matthew
psexec.exe is a simple executable which writes output to stdout (standard output) and stderr (standard error). So, to capture the output use: psexec.exe > stdout. txt to capture sent to stdout.
Use the /accepteula command-line switch to accept the licence agreement. Caution: if the reg key above is set to 0 (EULA was declined once) then the /accepteula will not work, you have to set the key to 1 manually (or delete it altogether). Great, thank you! /accepteula does the trick. I wonder why it's not documented?
It is clearly not safe to use PsExec's "-u" option on an untrusted remote host. On the other hand, using PsExec without "-u" and therefore authenticating as the currently logged-on user is much safer and does not expose the account to theft of password hashes, the Kerberos TGT, or the plain-text password itself.
PsExec allows you to run the command simultaneously on multiple remote computers. To do this, you can set the computer names separated by commas: psexec PC1,PC2 “ipconfig /all” or save them in a text file, and then specify a path to this file: psexec @c:\ps\computer_list.
PsExec v2.2 comes with -nobanner
option.
There does not appear to be a way to disable it from occurring, but as a workaround you could redirect STDERR which will suppress the output,
psexec \\remotemachine command 2>nul
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With