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
11
votes
5 answers

Start And Stop Windows Service remotely using PSEXEC

How to start and and stop a Windows service remotely using PSEXEC? Preferably the syntax to write I tried the cmdlet given below psexec \\Server -u Administrator -p Somepassword ServiceName
Selwyn
  • 1,621
  • 6
  • 21
  • 38
10
votes
2 answers

Run interactive batch in Visual Studio post build events

I have a program written in vb.net. After I build, I want to launch an interactive batch file that executes a psexec command remotely. How can I do that? this is my post build event: call "$(ProjectDir)ExecOnGw.bat" And this is my batch that if it…
davymartu
  • 1,393
  • 3
  • 15
  • 34
9
votes
4 answers

How to pass parameters to an exe?

I am using psexec on my server to run an exe file on another server. How do I pass parameters to the other exe ? The exe that I am running on my server is psexec which in turn must run the exe named vmtoolsd.exe located on another system. How do I…
spdcbr
  • 305
  • 3
  • 5
  • 15
9
votes
4 answers

Use Powershell to run Psexec command

First post so please don't hurt me. I've searched around but can't seem to find a way to do what I want. I've made a script that copies a folder I have to numerous computers at \$computer\c$. In these folders is a batch file that runs an .exe. What…
noz3r0
  • 315
  • 3
  • 4
  • 16
9
votes
2 answers

PsExec Windows 8 access denied

I've 8 computers running Windows 8 (the basic edition) and I'm trying to run some application on each of them with a batch script. I tried: PsExec.exe -i -d -u USER -p PASSWD \\PCNAME explorer.exe But it gives me: PsExec v1.98 - Execute processes…
Stefano
  • 131
  • 1
  • 2
  • 8
8
votes
5 answers

Running multiple commands in cmd via psexec

I'm working on creating a single command that will run mulitple things on the command line of another machine. Here is what I'm looking to do. Use psexec to access remote machine travel to proper directory and file execute ant task exit cmd run…
Steve Miskiewicz
  • 1,114
  • 1
  • 10
  • 23
8
votes
1 answer

Execute script using sysinternals PSExec from Asp.Net Web application

I am trying to execute PSExec from my Asp.Net Web application to connect to a remote server. Somehow it gives "Access Denied Error -5" with no credentials set, and by setting the credentials in the PSEXEC command it gives "2250 Network connection…
PSL
  • 123,204
  • 21
  • 253
  • 243
7
votes
1 answer

Why is WMI so much slower tha using utilities like PsExec or PsList?

I'm doing various OS management and querying tasks using WMI, but it allways take a long time for first WMI call(10 to 15s). When I tried few tools from sysinternals I found that they are so much faster and I want to know how is this possible. For…
Primoz
  • 4,079
  • 17
  • 56
  • 67
7
votes
6 answers

PsExec hang while being executed from a very simple c# or c++ gui program compiled as "windows application"

I am experiencing PsExec hang while being executed from a very simple c# or c++ gui program compiled as "windows application" (not as "console application"). Under section C) below I have pasted the code to reproduce the problem and under section…
sharrajesh
  • 401
  • 1
  • 5
  • 12
7
votes
3 answers

How to determine the session id on remote machine for usage with psexec -i using script/powershell/...?

I am in need of a script or powershell command that will be able to determine the session id of a specific logged in user on remote machine, to be later used as parameter to the psexec -i execution of remote gui process on that session of that user…
ruslanoid
  • 143
  • 1
  • 1
  • 5
7
votes
0 answers

MSBuild and PSExec integration issue, no prompt output

We ran into a problem with integrating MSBuild with PsExec. In our scenario, we run PsExec within a msbuild build file. The PsExec command runs another MSBuild file on a remote server to perform a task which we'd like to see its output on ourside.…
Houman
  • 1,381
  • 1
  • 8
  • 10
7
votes
4 answers

Using psexec.exe in jenkins, handle is invalid

I am using Jenkins on a Windows7 system. I would like to use it to execute a batch script on a remote Windows system. The batch script will be used to flash a development board and run some tests. I came across psexec.exe. That works well through a…
headinabook
  • 373
  • 3
  • 6
  • 14
7
votes
2 answers

Using PSEXEC returns no output from the remote task

I am using psexec to run an exe on a server. The command runs ok, but there is no output on my local console. This is the command I am using: psexec.exe \\my-machine ping localhost which results in: PsExec v1.94 - Execute processes…
Derek Ekins
  • 11,215
  • 6
  • 61
  • 71
6
votes
4 answers

Sleep command in batch file?

When I'm writing a batch file to run automatically, how do I write it so that when the batch file is run, it can pause for a couple seconds in between commands? Context: psexec \\server -u user -p pass cmd [there needs to be a pause here for psexec…
jayjyli
  • 771
  • 3
  • 11
  • 23
6
votes
2 answers

Can I specify a user account for a GitHub action step on a Windows runner?

I'm working with a GitHub action step on a Windows runner. One of the requirements of the executable I'm trying to run is that it can't be run as an administrator. It's there any way I can create and become a different user to the default…
Alexander Trauzzi
  • 7,277
  • 13
  • 68
  • 112
1
2
3
55 56