Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PSexec copyright output

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

like image 999
Matthew Lowe Avatar asked May 12 '15 13:05

Matthew Lowe


People also ask

How do I get output from PsExec?

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.

How do I accept PsExec EULA?

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?

Is PsExec safe to use?

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.

How do I transfer PsExec to another computer?

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.


2 Answers

PsExec v2.2 comes with -nobanner option.

like image 179
thoku Avatar answered Oct 10 '22 06:10

thoku


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
like image 35
Anthony Forloney Avatar answered Oct 10 '22 08:10

Anthony Forloney