In order to remove administrative shares in Windows, add the following two registry keys to the registry.
- To remove administrative shares for local administrator accounts, add the following key to the specified location;
Hive: HKEY_LOCAL_MACHINE\
Key: SYSTEM\CurrentControlSet\Services\LanManServer\Parameters
Name: AutoShareWks
Type: DWORD
Value: 0
- To remove administrative shares for domain administrator accounts, add the following key to the specified location;
Hive: HKEY_LOCAL_MACHINE\
Key: SYSTEM\CurrentControlSet\Services\LanManServer\Parameters
Name: AutoShareServer
Type: DWORD
Value: 0
After editing the registry, restart the Workstation and Server services to take the chances effect without restarting the computer.
- Restart the Workstation service;
net stop/start lanmanworkstation
- Restart the Server service;
net stop/start lanmanserver