PSExec on Windows 2008 R2 Failing “Network name cannot be found”

pstoolswindows-server-2008

We've got a bunch of remote admin scripts which rely on psexec and they do not appear to be working over the network on our new 2008 hosts. An error dump is below:

C:\Users\<user>\Desktop\PsTools> psexec \\<host IP> -u Administrator -p <pass> <cmd>
PsExec v1.97 - Execute processes remotely
Copyright (C) 2001-2009 Mark Russinovich
Sysinternals - www.sysinternals.com
Couldn't access <host IP>:
The network name cannot be found.
Make sure that the default admin$ share is enabled on <host IP>.

We've tried both the machine name and the IP address in with the same results. The same command has worked previously with our Win2K3 hosts – so we're presuming it is some form of security change between the 2003 and 2008R2.

Anyone have any clues?

Best Answer

There are some Inbound Connection rules of the Windows Server firewall you'll have to enable for File and Printer Sharing:

  • Echo Request
    • ICMpv4-In
    • ICMpv6-In
  • NB-Datagram-In
  • NB-Name-In
  • NB-Session-In