Questions tagged [psexec]

PsExec is a light-weight telnet-replacement that lets you execute processes on other systems, complete with full interactivity for console applications, without having to manually install client software.

PsExec is a Windows command line tool written by Mark Russinovich and available through Microsoft's Windows Sysinternals: http://technet.microsoft.com/en-us/sysinternals/default.

From Sysinternals:

Utilities like Telnet and remote control programs like Symantec's PC Anywhere let you execute programs on remote systems, but they can be a pain to set up and require that you install client software on the remote systems that you wish to access. PsExec is a light-weight telnet-replacement that lets you execute processes on other systems, complete with full interactivity for console applications, without having to manually install client software. PsExec's most powerful uses include launching interactive command-prompts on remote systems and remote-enabling tools like IpConfig that otherwise do not have the ability to show information about remote systems.

The 'PS' prefix has nothing to do with PowerShell - it appears because a previous tool by the same author used a 'PS' prefix (PsList, for listing information about processes). Various related tools are packages together in a suite called 'PsTools'.

839 questions
2
votes
3 answers

Why doesn't this work

Why doesn't this work? I want to copy the file to the remote machine and run it. psexec \\epo-test -c C:\temp\Avmr64.msi /Silent Heres the error I get PsExec could not start Avmr64.msi on epo-test: The system cannot find the file specified. I am…
user770022
  • 2,899
  • 19
  • 52
  • 79
2
votes
1 answer

Failed to run git clone when using psexec

I'm trying to run git clone from a remote machine using psexec. When I run it from a local machine it works OK. git clone -b develop --single-branch http://server:8080/git/root/AAA.git C:\GIT_Repository\AAA But when running the same with psexec it…
Epligam
  • 741
  • 2
  • 14
  • 36
2
votes
1 answer

When executing a batch file from python, the output is only the first line

I'm using the 'qwinsta' cmd command to get the session ID of a remote computer and output it to a textfile, so I create a new batch file and write the command then I try running the batch file through python but it only returns the first line of the…
Maroya
  • 21
  • 1
2
votes
2 answers

Syntax issues with call operator (&)

I'm working on a generic/common PS script that I can use to execute other scripts remotely on multiple machines. Using psexec for this. I know there are other ways to do it but psexec seems to be the most reliable in my scenario. Here is an…
martopg
  • 21
  • 2
2
votes
0 answers

Run psexec.exe by jenkins hosted in Docker container, error "handle is invalid"

I got following error when Jenkins hosted in docker Windows container executing a psexec command. How to resolve this? thanks. Jenkins output: C:\jenkins\workspace\HAT-Dev>c:\windows\temp\PSexec \\\\15.15.183.123 -u Work2019 -p password -s -i 0 -d…
Ming
  • 379
  • 1
  • 6
  • 20
2
votes
1 answer

Problem while trying to run .exe on remote with psexec (c#)?

Hey all, I'm trying to run an exe file ON A REMOTE MACHINE (not from, but ON). I have very simple code as following: ProcessStartInfo info = new ProcessStartInfo("C:\\PsTools"); info.FileName = "psexec \\\\" + machine.Name + "\\C\\Program…
Amit
  • 21
  • 1
  • 2
2
votes
1 answer

Trying to Remotely use PsTools (PsExec) to Return a Result on Powershell

I am trying to run a script remotely that will double check that the IP address is correct using PsExec in Powershell. The problem is I only want it to return the result True or False and not show any other lines within Powershell. I have tried…
MHausner
  • 75
  • 1
  • 7
2
votes
1 answer

C# Screenshot winlogon as well as User Desktop

I am working with screen sharing project.But i was got into trouble to capture secure desktop. I have already ask related question here and got Answer too Pls go through above link as suggested by dymanoid. I am using PsExec exe to capture secured…
Azar Shaikh
  • 445
  • 9
  • 26
2
votes
1 answer

Why is Process.StandardOutput different from the actual output and/or incomplete?

Well, first of all, when executing PsExec commands from C#, part of the output is in the StandardOutput and another part is in the StandardError for some reason, as mentioned in other posts, but that's not big of a deal. Now, the problem is: Even…
2
votes
1 answer

psexec process not set in java: "cannot find the file specified"

I am trying to run some code, but I get an error: String strCmd = "psexec.exe \\server -u use -p aaa tasklist"; Process process = Runtime.getRuntime().exec(strCmd); BufferedReader stdout = null; stdout = new BufferedReader(new…
brucewayne
  • 53
  • 2
  • 7
2
votes
1 answer

Running PsExec From IIS: PsExecSVC hanging on remote host

I am trying to run a .bat file on a remote host from a web page. PSEXECSVC (on host) will hang and not close after the execution of the batch causing the server to wait indefinitely. When running the exact same code (See at bottom) in a Console…
Apoulet
  • 115
  • 3
  • 10
2
votes
2 answers

Run Batch file As Admin (PSEXEC)

I have Batch file that need ADMIN Privilege to run (My ADMIN have Password). So I Have 2 Batch File to run (This method is working but I need to run only in 1 Batch File for Result capturing in VBA): (1) C:\PSTools\psexec.exe \\PECPC021 -u…
Falhuddin
  • 103
  • 2
  • 11
2
votes
1 answer

use for loop for psexec in same line

I have been banging my head with this small script to search a delete a file from the remote host. However, I have been able to write to seperate scripts, both to delete and to find a file. However, now I am trying to merge both and I am unable to…
Bilal Ahmad
  • 191
  • 1
  • 2
  • 17
2
votes
1 answer

Does psexec support input redirection?

I am trying to control a remote Python script via psexec, which reads commands from stdin, but I need to redirect psexec's input since psexec itself will be launched from another program. However, I have no luck making psexec accept redirected…
aknuds1
  • 65,625
  • 67
  • 195
  • 317
2
votes
0 answers

How to run multiple instance of PSEXEC command within a single computer

I have created a program in Java that executes a PSEXEC command. Whenever I run the program individually it works fine. But when the program runs 5 times at the same time, only the first instance was successful the other 4 failed to execute. Is…
Roland
  • 39
  • 1
  • 6