Make sure that the default admin$ share is enable on ServerName

前端 未结 3 635
孤城傲影
孤城傲影 2021-02-06 02:16

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 Serve

3条回答
  •  伪装坚强ぢ
    2021-02-06 02:42

    Solution:

    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. Click the check box Share this folder
    4. Enter the name admin$ and hit Permissions
    5. I would recommend removing 'Everyone' and adding just the users that the PsExec command will use to execute.

    Run 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.

    1. Start regisry regedit
    2. Search for key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\AutoShareServer
    3. Change the AutoShareServer key to 1

提交回复
热议问题