When running the psexec command to remotely install or execute something on a sever on the same network the following error was displayed.
Couldn't access ServerName
The network name cannot be found
Make sure that the default admin$ share is enable on ServerName
Most references suggested that you add the following to the registry, but in my case this was already added to the server. This did not resolve the issue.
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System and create or modify a REG_DWORD value LocalAccountTokenFilterPolicy and set its value to 1
Solution:
You need to add the 'admin$' share which is your C:\Windows location.
C:\windows
and right-click --> Properties
advance sharing
Share this folder
admin$
and hit PermissionsRun the PsExec command again and this should resolve your issue.
Edit:
You can also turn on your AutoShareServer in the registry, which will automatically create the admin shares.
regedit
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\AutoShareServer
AutoShareServer
key to 1