Make sure admin $ share is included in ServerName by default

When you run the psexec command to remotely install or execute something on a server on the same network, the following error is displayed.

Failed to access ServerName

Cannot find network name

Make sure admin $ share is included in ServerName by default

Most of the recommendations indicated that you added the following to the registry, but in my case it was already added to the server. This did not solve the problem.

HKEY_LOCAL_MACHINE \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ System and create or change the REG_DWORD LocalAccountTokenFilterPolicy value and set its value to 1

+8
installer remote-access remote-debugging psexec
source share
4 answers

Decision:

You need to add the admin $ share, which is your C: \ Windows location.

  1. Go to C:\windows and right click -> Properties
  2. Hit advance sharing
  3. Check the Share this folder box.
  4. Enter admin$ name and click Permissions
  5. I would recommend deleting "All" and adding only the users that the PsExec command will use.

Run the PsExec command again and this should fix your problem.

Edit:

You can also enable your AutoShareServer in the registry, which will automatically create admin shares.

  1. Start registration regedit
  2. Key search HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\AutoShareServer
  3. Change the AutoShareServer key to 1
+12
source share

In my case, it was a network issue that was mentioned in the error message.

I needed to allow SMB traffic through port 445 on the target machine. PSExec worked immediately after adding a firewall rule to allow this traffic.

+1
source share

You can also activate amins $ share by enabling the File and Printer Sharing (SMB-In) firewall rule.

Go to Control Panel > System ans Security > Windows Defender Firewall > Advance Settings > Inbound Rules . Right-click on the file and printer (SMB-In) from the list and select "Enable Rule". Typically, there are two file and printer sharing modes (SMB-In), one for the domain profile and one for the public and private profile . I am not sure which profile should be applied, domain or public or private. For me, this is a domain profile.

0
source share

On a remote machine:

in the firewall settings

Enable inbound port 445

Enable port 137 inbound

add reg key:

 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System LocalAccountTokenFilterPolicy=1 
0
source share

All Articles