0

I'm trying to successfully run a batch file located on a server pc (Windows Server 2008 R2) from my Windows 7 client PC. But its not working and the command prompt shows the following error information message.

When I run

psexec \\199.219.21.141 -u admin /c "C:\Compile.bat"

I'm prompted for password, and when I enter the password and press I get

Make sure that the default admin$ share is enabled on 199.219.21.141 

(which is my machine ipaddress)

The user admin is part of the Local administrators on the server machine

Things I tried,

  1. Turning off the UAC Turning OFF the Windows Firewall
  2. Setting the LocalAccountTokenFilterPolicy DWORD to 1 in, HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
  3. Caching the user credentials using

cmdkey.exe /add:MACHINE_NAME_HERE /user:199.219.21.141\admin /pass:PASSWORD_HERE psexec.exe \199.219.21.141 -i notepad cmdkey.exe /delete:199.219.21.141

After trying to connect for some time, it again displays

 Make sure that the default admin$ share is enabled on 199.219.21.141 

Any ideas what am I doing wrong?

this-Me
  • 2,139
  • 6
  • 43
  • 70
  • 1
    What about [this](http://stackoverflow.com/questions/18388381/make-sure-that-the-default-admin-share-is-enable-on-servername)? – wOxxOm Aug 28 '15 at 11:17
  • Also see Mark Russinovich's article on [PsExec](http://windowsitpro.com/systems-management/psexec). The last paragraph outlines, how the tool is implemented. With that information, you will see, when and why you get the error message you get. – IInspectable Aug 28 '15 at 12:02
  • Are you *sure* you turned the firewall off on the server? – Harry Johnston Aug 28 '15 at 23:59
  • @HarryJohnston : Yes I did – this-Me Aug 31 '15 at 03:09
  • @wOxxOm : Yes, I even have a admin share created for C:\Windows folder with Read/Write/Execute access given for the user who executes PsExec command from a client PC – this-Me Aug 31 '15 at 03:11
  • What happens if the user says `dir \\server\admin$` ? – Harry Johnston Aug 31 '15 at 03:31
  • @HarryJohnston : I get the same error, Make sure that default admin$ share is enabled – this-Me Aug 31 '15 at 05:57
  • @HarryJohnston : Works fine when I run the commands between two Windows 7 machines. But doesn't work when Win 2008 server comes into picture – this-Me Aug 31 '15 at 06:01
  • *"Make sure that default admin$ share is enabled"* is not an error message of the `dir` command. HarryJohnston suggested you run `dir \\server\admin$` on **your** machine, without `PsExec`, to diagnose, whether the admin$ share is accessible on the remote machine. – IInspectable Aug 31 '15 at 07:17
  • I get Error: The network path was not found.Although the same format on Windows 7 machine works perfectly. – this-Me Aug 31 '15 at 08:35
  • So in other words: The admin$ share is inaccessible. Either it doesn't exist, or it isn't accessible for a number of other reasons. For example: [Can't connect to default admin share on Windows 2008](http://serverfault.com/q/38999). – IInspectable Aug 31 '15 at 11:57
  • Can you ping the server? – Harry Johnston Aug 31 '15 at 21:26
  • Yea I thought so. The admin$ share is not accessible and via ping it works just fine. I have to restart the server or something. Not sure – this-Me Sep 01 '15 at 02:52
  • I can see the files listed if I run the \\IPaddress\ShareName$ – this-Me Sep 04 '15 at 08:24

0 Answers0