HOWTO: Disable File Sharing Windows 10

Folder sharing is provided for file sharing, for example, in a home network between a computer and a laptop. If necessary, you can disable file sharing to the disk, partition or a specific folder, in the presented guide discusses how to disable shared access to folders in Windows 10.

On most computers running Windows operating systems, users have repeatedly noticed that the Users folder is open for public viewing, even if the owner of the computer did not take any action to do so. The fact is unpleasant, because attackers can take advantage of this loophole and get full access to your confidential information.

As a rule, this happens on those machines that are connected to a particular local network. If you allow sharing for any network resources, the system creates the Users folder, through which remote users can view your desktop and the My Documents folder.

To avoid this undesirable phenomenon, you must revoke the permission to share the Users folder.

Consider several ways to close public access to folders. For example using the fsmgmt.msc snap-in, Windows Explorer or cmd.

In Windows 10, using the fsmgmt.msc snap-in, you can not only close the shared access to drives and individual folders, but also get information about shares, active sessions, and open files. This article show how to disable File Sharing Windows 10

Solution 1 to Disable File Sharing. Open the Fsmgmt.Msc

To open the fsmgmt.msc snap-in in Windows 10, press the Win + R key combination, type fsmgmt.msc, click the OK button

Solution 1 to disable file sharing is to open the fsmgmt.msc

Stop Folder Sharing Using Snap-in Fsmgmt.Msc

In the “Shared Folders” window, in the left menu, select “Shares” (see Screen 2), and on the right, select the shared folder to which you want to close sharing, right-click on it and click the “Stop Sharing” button in the context menu (see Screen 3). When you close the shared access to the folder, it will disappear from the list of shared resources.

Stop Sharing

Solution 2 to Disable File Sharing. Open the Explorer

Open Explorer => find the folder, access to which you want to close => click on it with the right mouse button and select "Properties"

Solution 2 to disable file sharing is to Open the Explorer

Open Sharing Tab and Close Access

Open the "Sharing" tab => go to "Share"

Open Sharing Tab

Uncheck the box "Share this folder." If you now click on "OK" - the shared access to the folder will be closed.

The next step to Disable File Sharing is to uncheck share this folder

Disable Sharing the Windows 10 Folder via the Command Line

File sharing can be configured much faster if you use the command line (console, cmd.exe). Just one command to execute in the console:

net share ShareOne2 /delete

This command deletes the network (public) ShareOne2 folder. The ShareOne2 folder of course remains in place.

net share delete

Also consider using Action1 to disable file sharing if:

  • - You need to perform this action on multiple (hundreds or even thousands) computers simultaneously.
  • - Some of your endpoints are laptops not connected to corporate network at all times.

Action1 is a cloud-based platform for software deployment, software/hardware inventory, patch management, endpoint configuration and more. It is free with basic functionality.


Other Relevant HOWTOs: