Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to use psexec to run a program on my windows server 2008 boxes. It returns with the message "Can't access myserver: The network path was not found."

If I turn off Windows Server firewall, I can successfully run the command.

Can anyone help me with the specific settings I need to change in windows server 2008 firewall to get this to work?

Thanks in advance...

share|improve this question

migrated from stackoverflow.com Sep 21 '10 at 19:30

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers

Here are the In Bound Connection rules that need to be enabled:

  • Under "File and Printer Sharing"
    • Echo Request
      • ICMpv4-In
      • ICMpv6-In
    • NB-Datagram-In
    • NB-Name-In
    • NB-Session-In
share|improve this answer
add comment

I'm still confused as to why psexec is the remote shell of choice when WinRM offers all of the same benefits but with a single port opening in the firewall.

It does need configuring but probably less than PSExec. No problems if you've settled on psexec already, I'm just offering additional options. :)

Really quickly you need to execute winrm quickconfig on the machine that you wish to control. This quickstart command alters a number of settings throughout the system so it's worth investigating if your security policies allow this before you run it.

Once run, you can use WinRS like this:

WinRS -r:Computername ipconfig

You can, if you don't already have permissions on the target system, run the command with other credentials.

WinRS -r:Computername -u:Username -p:Password ipconfig

You can also use PowerShell commands on remote machines configured for remote management. From within Powershell management

Invoke-Command hostname {powershell-command} or icm hostname {powershell-command}

If you have the right infrastructure, WinRM and WinRS can replace the need for psexec and the quickconfig command makes setup simple enough.

Cheers

Lewis

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.