4

I'm simply attempting to open calculator on a remote machine in order to test the connection before I write a bigger script. I'm no pro with psexec yet, but I have never seen before what is happening and cannot find an answer to this question anywhere.

I'm attempting every version I know of the simple command: psexec \\target calc

My computer is running Windows 7 Enterprise. The target is running Windows 2008 R2.

When I hit 'Enter' the command seems to run as it should initially. I get the two messages about "Connecting..." and "Starting psexec...", but then nothing happens. Calculator doesn't start on the target computer, psexesvc doesn't start, I don't get any errors or messages, and I don't get control back in the cmd window I ran the command from. I have to close it.

Here is what I have tried different combinations of:

  • The -i and -d switches.
  • -u and -p with both my normal account and admin account
  • -accepteula, /accepteula, and using accepteula twice as per this post
  • Ran psExec on the target machine to manually accept the License Agreement that pops up the first time it is used
  • Checked that the Admin$ share was enabled
  • Followed most of the directions from karlchen in this post and successfully ran the three lines of code suggested.
  • Searched through any articles that seemed relevant in the psExec FAQ on the Sysinternals forums.
  • Executed programs other than calculator, like cmd and a simple batch file I put on the target's desktop
  • Left the cmd window open for a few hours just to see if it was taking it's time
  • Ran psExec at other target machines (successfully) to see if my computer is the problem
  • psList and psService work on the target computer
  • Ran cmd as administrator
  • Can successfully run this command at other servers with the same antivirus setup
  • Tried everything suggested in the two answers that have been given

None of those things changed the results or helped me find a way to change them. What else can I try for troubleshooting this problem?

10
  • I'm having the same problem as of yesterday: serverfault.com/questions/760869/psexec-slow-to-start-a-process/… Mar 2, 2016 at 18:36
  • Did you install windows updates in the last couple of days? Do you have antivirus installed? When did it update itself last? Mar 2, 2016 at 18:37
  • I haven't installed any Windows updates in the past couple days. The target computer just did an update for virus definitions today.
    – Alamb
    Mar 2, 2016 at 18:42
  • Which antivirus are you using? I've got McAfee. Have you tried letting psexec hang there for a few minutes and see if it eventually works? Mine takes anywhere from 90 seconds to 15 minutes, and then it just wakes up from its nap and works as expected. Mar 2, 2016 at 18:46
  • I let it sit for 3 hours a couple days ago with no change. We've got System Center Endpoint Protection for antivirus.
    – Alamb
    Mar 2, 2016 at 18:48

3 Answers 3

1

If UAC is enabled on the target computer, you might need to turn it off. I tried it just now on a target machine that has UAC disabled, and it worked, though I got some quirky results.

2
  • UAC is disabled on all my machines, and I still have my issue, which is probably the same as the one reported here. Mar 2, 2016 at 18:47
  • UAC settings are set to "never notify".
    – Alamb
    Mar 2, 2016 at 18:51
1

I built an application that uses PSExec and had the same issues. Here are the steps I took to ensure it worked:

Things to try:

  • If either machine has antivirus, this may be causing it to hang.

  • Ensure your login details for the server/share are correct, as this may also cause it to hang.

  • Ensure the machine you are trying to connect to is accessible (you can see it within the network).

4
  • So far, the antivirus definitions updated as recently as yesterday are the likely culprit. Mar 2, 2016 at 19:21
  • Ok, I just tried all 3. I just ran the calc command at a different server with the same AV setup and it worked immediately. I can RDP into the server (which I'm assuming means my login details are correct). And the server is accessible - I was able to access all its files through windows explorer on my machine.
    – Alamb
    Mar 2, 2016 at 19:58
  • Do you have this installed on either machine? support.microsoft.com/en-us/kb/3134228 Mar 2, 2016 at 20:10
  • No, I don't see it on either machine.
    – Alamb
    Mar 2, 2016 at 20:20
1

Firewall could be the cause of this issue. Try running this at the command prompt of your target machine ..

netsh AdvFirewall firewall add rule name=PSExec dir=In action=allow protocol=TCP localport=RPC profile=domain,private program=""%WinDir%\system32\services.exe"" service=any

This will allow PSExec through your firewall on Private and Domain connections.

1
  • upvote for helpful but partial solution: this was only place I found psexec specific firewall rule
    – RoelDS
    Feb 8, 2023 at 0:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .