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
1 answer

Batch file - Syntax command is incorect

I got this command below. @echo off pushd %~dp0 echo "checking unhealthy cmclient" >> %~dp0\pc_down_info.txt for /F %%M in (%~dp0\pc_info.txt) do ( ping -n 1 -w 1 %%M >nul if errorlevel 1 echo %%M is down >>…
Regie Baguio
  • 241
  • 5
  • 13
2
votes
2 answers

Wait for PsExec calling cmd /c to finish in PowerShell

I have a dynamically generated batch file that I push out to a remote PC and then execute it using PsExec. The issue I am facing is that as soon as that line is called, the PowerShell script moves on and doesn't wait for it to finish. Here is what I…
rjbogz
  • 860
  • 1
  • 15
  • 36
2
votes
3 answers

PsExec does not detect my c# console app is finished

I use PsExec for executing several command line programs, but when I call my own build C# (.net 4.0) console app, PsExec does hang, and will not finish... When calling other console apps, PsExec will return output like this: PsExec v1.98 - Execute…
Dennis
  • 1,810
  • 3
  • 22
  • 42
2
votes
1 answer

Password set in batch file not taking last character

I have a batch file that accept input from the user for the password. It does not take the last character for some reason and I cannot figure it out. powershell -Command $pword = read-host "Enter password " -AsSecureString ;…
host_255
  • 361
  • 2
  • 7
  • 18
2
votes
0 answers

PSExec never exits even though the remote executable has exited

I am using PSExec, which is called in one of my powershell scripts, to remotely run an executable on a remote machine and wait until it's execution finishes (using the -Wait flag on the Start-Process cmd that starts PSExec). For some reason, the…
Choub890
  • 1,163
  • 1
  • 13
  • 27
2
votes
1 answer

Reading text line by line in a batch file with using psexec and wmic

I have test.txt file as below like all ip. (example:) 192.168.xxx.50 192.168.xxx.51 192.168.xxx.52 192.168.xxx.53 192.168.xxx.54 192.168.xxx.55 I want to make batch file with using psexec, wmic by those IP FOR /F "tokens=* delims=," %%i in…
user5217643
2
votes
1 answer

PsTools Cannot Connect Remotely with IP Address

I need to grab information remotely from a few pcs using PsTools. Currently I get all the info I need through an ethernet connection using commands like: psinfo \\(computer name) -u User -p Password But I need to remotely connect and run commands…
Luke R
  • 97
  • 1
  • 1
  • 14
2
votes
2 answers

PSEXEC Not executing command when password with " is specified

Issue: PSEXEC Executed from PS Script not running the command passed as argument when -p is specified along with a password that contains ". Code: $x = read-host -prompt 'Enter something:' PSEXEC -u storeadmin -p ('"' + ($x -replace '"', '""') +…
Luigi
  • 439
  • 5
  • 23
2
votes
2 answers

Psexec returns an access denied error in a c# code

I'm try trying to launch remote command via psexec tool, it is running successfully in command prompt. However in c#, I get the following output error: Access is denied . here is my command: psexec \servername -u xxxxxxx -p xxxxxxxxxx -h -w…
Sami Kobbi
  • 309
  • 1
  • 7
  • 17
2
votes
2 answers

PSEXEC runs successfully via command prompt but fails in ASP .Net/C#

I'm trying to run a command on remote machine using PSEXEC tool, it runs successfully using command prompt but it fails in an asp.net project showing the following output error. PsExec v2.11 - Execute processes remotely Copyright (C) 2001-2014…
Sami Kobbi
  • 309
  • 1
  • 7
  • 17
2
votes
3 answers

Issue with nested calls with psexec (access denied)

First of all, sorry for my poor english. I would try to explain my problem. I am using psexec within a script to restart a cluster as follows: script1 in node1: perform a lot of tasks (shutdown services, check status, etc..) in the node1 and after…
user41931
  • 31
  • 1
  • 4
2
votes
2 answers

PSexec file on list of computers speed up

I was hoping I could have some help with this. I have about 300 computers that I have to clear all the temporary internet folders on and separately do a logoff on them. Currently I have a file located on the C: drive that has the following…
swstrau118
  • 181
  • 4
  • 7
  • 15
2
votes
1 answer

PSExec does not show output of the started child process (local machine)

We are in the need of spawning processes from session 0 isolation to a logged in user in session 1. This task is done by using psexec, this happens entirely on the same machine, but I am unable to get the output of the child process to be displayed…
Samuel
  • 6,126
  • 35
  • 70
2
votes
1 answer

Cannot press any key to continue with command pause

I wrote a script to remote execute test.cmd file by PsExec.exe. PsExec.exe \\IP -u administrator -p password "C:\\Users\Administrator\Desktop\test.cmd" Although I can run the script successfully, I cannot press any key to continue the process when…
Huck Lin
  • 21
  • 3
2
votes
1 answer

PsExec on two XP machines says "Access Denied"

I have two XP machines and I have the following situation. I am running psexec from comp1 comp2 does not have any password My bat file command psexec -i -d -c \\comp2 c:\xyz.exe The error message I get is Couldn't access comp2: Access Denied I…
Allan Fernandes
  • 121
  • 2
  • 13