Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Windows 10 / Managing Administrative Shares (Admin$, IPC$, C$, D$) in Windows 10

February 11, 2021 Windows 10Windows Server 2016

Managing Administrative Shares (Admin$, IPC$, C$, D$) in Windows 10

Administrative Shares are used in Windows to remotely access and manage a computer. If you open the computer management console (compmgmt.msc), expand the System Tools -> Shared Folders -> Share section, or run the net share command, you will see a list of admin shared folders (these folders are hidden in the network neighborhood and access to them is restricted).

Contents:
  • What are Administrative Hidden Shares on Windows?
  • How to Disable/Enable Admin Shares on Windows 10?
  • Enable Remote Access to Admin Shares on Windows 10 using LocalAccountTokenFilterPolicy

What are Administrative Hidden Shares on Windows?

By default, Windows creates the following admin shares:

  • Admin$ — Remote admin (this is the %SystemRoot% directory)
  • IPC$ — Remote IPC (used in named pipes)
  • C$ — Default Drive Share

If there are other partitions on the computer that are assigned a drive letter, they are also automatically published as admin shares (D$, E$, etc.). If you are using a shared printer, then there should be a Print$, or FAX$ share if you are using a fax server.

view a list of hidden administrative shares on windows 10 (Admin$, IPC$, C$, D$)

Note that the names of administrative shares end with a $. This mark causes LanmanServer to hide these SMB resources when accessed over the network (specific files and folders in the shared network folder can be hidden using Access-Based Enumeration). If you try to view a list of shared network folders available on the computer in File Explorer (\\computername), you won’t see them in the list of available SMB shares.

shared folder on windows 10

You can get a list of available admin shares on a remote computer using the command:

net view \\computername /all

view admin shares on remote computer cmd: net view \\computername /all

Most third-party file managers for Windows have the options to automatically display available admin resources on remote computers when browsing the network.

In order to view the contents of an admin share from File Explorer, you must specify its full name. For example, \\computername\c$. This command will open the contents of the local drive C and allow you to access the file system of the system drive of the remote computer.

Only members of the local computer Administrators group (and the Backup Operators group) can get access to administrative shares, provided that you have SMB enabled, turned on file and printer sharing and access via TCP port 445 is not blocked by Windows Defender Firewall rules .

view contents of the admin share c$

How to Disable/Enable Admin Shares on Windows 10?

Windows administrative shares are convenient for remote computer administration, but they carry additional security risks (At the very least, you shouldn’t use the same local administrator password on all computers. Use LAPS to make passwords unique). You can completely prevent Windows from creating these hidden admin shares.

The easiest way to remove the admin share is to right-click the share name in the Computer Management snap-in and select Stop sharing (or use the net share Admin$ /delete command). However, after restarting Windows, the Admin$ share will be recreated automatically.

stop sharing hidden admin shares on windows 10

In order to prevent Windows 10 from publishing administrative shares, you need to open the registry editor (regedit.exe), go to the registry key HKLM\System\CurrentControlSet\Services\LanmanServer\Parameters and add a Dword parameter named AutoShareWks (for desktop versions of Windows) or AutoShareServer (for Windows Server) and the value 0.

AutoShareWks - reg key to disable / enable default windows administrative shares

You can create this registry parameter manually, from the reg add command line tool, or through PowerShell:

reg add HKLM\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters /f /v AutoShareWks /t REG_DWORD /d 0

or

New-ItemProperty -Name AutoShareWks -Path HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters -Type DWORD -Value 0

You can deploy this registry parameter to all domain computers through a GPO.

Now, after a reboot, administrative shares will not be created. In this case, the tools for remote computer manage, including psexec, will stop working.

If you want to enable admin shares on Windows, you need to change the parameter value to 1 or delete it:

Set-ItemProperty -Name AutoShareWks -Path HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters -Value 1

How to enable c$ admin share on Windows 10 and Windows Server 2016

To have Windows recreate the hidden admin shares, simply restart the Server service with the command:

Get-service LanmanServer | restart-service -verbose

restart LanmanServer to recreate admin shares

Enable Remote Access to Admin Shares on Windows 10 using LocalAccountTokenFilterPolicy

There is one important issue when working with Windows admin shared folders on a computer that is not joined to an Active Directory domain (part of a workgroup). Windows 10, by default, restricts remote access to administrative shares to a user who is a member of the local Administrators group. The remote access available only under the built-in local Administrator account (it is disabled by default).

Here is what the problem looks like in detail. I’m trying to remotely access the built-in admin shares on a computer running Windows 10 that is a member of a workgroup (with the firewall turned off) as follows:

  • \\w10_pc\C$
  • \\w10_pc\D$
  • \\w10_pc\IPC$
  • \\w10_pc\Admin$

In the authorization window, I specify the credentials of an account that is a member of the local Administrators group on Windows 10, and get an “Access is denied” error. At the same time, I can access all network shares and shared printers on Windows 10 (the computer is not hidden in Network Neighborhood). Also, I can access administrative shares under the built-in Administrator account. If this computer is joined to an Active Directory domain, the access to the admin shares from domain accounts with administrative privileges is not blocked.

Can't access ADMIN$ share remotely under admin accounts

The point is in another aspect of security policy that appeared in the UAC – so called Remote UAC (User Account Control for remote connections) that filters the tokens of local and Microsoft accounts and blocks remote access to admin shares under such accounts. When accessing under the domain accounts, this restriction is not applied.

You can disable Remote UAC by creating the LocalAccountTokenFilterPolicy parameter in the registry

Tip. It will slightly reduce the Windows security level.
  1. Open the Registry Editor (regedit.exe);
  2. Go to the following reg key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System ;
  3. Create a new DWORD (32-bit) parameter with the name LocalAccountTokenFilterPolicy;
  4. Set the LocalAccountTokenFilterPolicy parameter value to 1;Remote local administrator & LocalAccountTokenFilterPolicy regestry parameter
  5. Restart your computer to apply the changes.
Note. You can create the LocalAccountTokenFilterPolicy registry parameter using the following command:

reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "LocalAccountTokenFilterPolicy" /t REG_DWORD /d 1 /f

After rebooting, try to remotely open the C$ admin share on a computer running Windows 10. Log in using an account that is a member of the local Administrators group. A File Explorer window should open with the contents of the C:\ drive.

remotely accessing the C$ admin share with a local account

Note. After that, other Windows 10 remote management functionality will become available. Including now you can remotely connect to a computer using the Computer Management snap-in and other standard Windows mmc consoles.

So, we looked at how to allow remote access to hidden admin shares for all local administrators of a computer running Windows 10 using LocalAccountTokenFilterPolicy key. This guide is also applicable to Windows 8.1, 7 and Windows Server.

6 comments
12
Facebook Twitter Google + Pinterest
previous post
Packet Monitor (PktMon) – Built-in Packet Sniffer in Windows 10
next post
Configuring Network Settings on RHEL/CentOS

Related Reading

How to Connect VPN Before Windows Logon

November 14, 2023

Using WPAD (Web Proxy Auto-Discovery Protocol) on Windows

November 7, 2023

Zabbix: How to Get Data from PowerShell Scripts

October 27, 2023

Tracking Printer Usage with Windows Event Viewer Logs

October 19, 2023

How to Use Ansible to Manage Windows Machines

September 25, 2023

6 comments

Vicky April 5, 2022 - 12:08 am

Thank you very much for this information. I have an odd circumstance, where I need to find out all the people MAC of who is remote into my computer. I was finally able to get my network to run on Private and it stay there I’m finding a second network on my computer. I have other situations that backs this up in my router settings.

Reply
Jadden April 8, 2022 - 4:54 pm

check event viewer

Reply
CityguyUSA August 25, 2022 - 4:42 am

Thank God someone had the answer.

Reply
johhny September 3, 2022 - 8:12 am

how to change permission without deleting a share from cmd?

Reply
Endang Irawan September 8, 2022 - 7:09 am

what the impact if we have disable c$ d$ etc on the server?

Reply
Lynda April 13, 2023 - 5:17 pm

Oh do I LOVE you…let me count the ways…! Thanks xoxo!

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • How to Connect VPN Before Windows Logon

    November 14, 2023
  • Removing Azure Arc Setup Feature on Windows Server 2022

    November 9, 2023
  • Using WPAD (Web Proxy Auto-Discovery Protocol) on Windows

    November 7, 2023
  • Send Emails with Microsoft Graph API and PowerShell

    November 6, 2023
  • Zabbix: How to Get Data from PowerShell Scripts

    October 27, 2023
  • Tracking Printer Usage with Windows Event Viewer Logs

    October 19, 2023
  • PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

    October 15, 2023
  • Reset Root Password in VMware ESXi

    October 12, 2023
  • How to Query and Change Teams User Presence Status with PowerShell

    October 8, 2023
  • How to Increase Size of Disk Partition in Ubuntu

    October 5, 2023

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • How to Repair EFI/GPT Bootloader on Windows 10 or 11
  • How to Restore Deleted EFI System Partition in Windows
  • Network Computers are not Showing Up in Windows 10/11
  • Updating List of Trusted Root Certificates in Windows
  • How to Create a Wi-Fi Hotspot on your Windows PC
  • How to Sign an Unsigned Device Driver in Windows
  • How to Download APPX File from Microsoft Store for Offline Installation?
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top