How to stop sharing folder on Windows 11

Windows 11 lets you easily stop sharing a folder through File Explorer, Computer Management, PowerShell, or Command Prompt, and here's how.

Stop sharing a folder on Windows 11
Stop sharing a folder on Windows 11

On Windows 11, the file-sharing feature lets you share virtually any type of content (such as documents, pictures, videos, etc.) with other users in the network, removing the extra steps to email files or using a USB flash drive.

Although it’s a convenient feature, you may need to stop sharing a folder for whatever reason. Windows 11 has multiple ways to turn off sharing file sharing to remove the shared folder from the network using File Explorer, Command Prompt, and Computer Management if that day comes.

In this guide, you will learn the steps to stop sharing a network folder on Windows 11.

Stop sharing folder on Windows 11 with File Explorer

To stop sharing a network folder on Windows 11, use these steps:

  1. Open File Explorer on Windows 11.

  2. Browse to the folder location.

  3. Right-click the folder and click on Show more options.

  4. Select the “Give access to” menu and choose the Remove access option.

    Windows 11 folder remove access

  5. Click the “Stop sharing” option to remove the shared folder from the network on Windows 11.

    Stop sharing folder

Once you complete the steps, the folder and its contents will no longer be available in the network on Windows 11.

Stop sharing folder on Windows 11 with Computer Management

To turn off file sharing for any folder with Computer Management, use these steps:

  1. Open Start.

  2. Search for Computer Management and click the top result to open the console.

  3. Expand the Shared Folders branch from the left pane.

  4. Click the Shares item.

  5. Right-click the folder and select the “Stop Sharing” option to remove the folder from the network.

    Stop sharing folder using Computer Management

  6. Click the Yes button.

After you complete the steps, file-sharing will turn off for that particular folder share on Windows 11.

Although you can stop sharing a folder within the folder’s location, using Computer Management is the best option because it allows you to see and control the shares from one place.

Stop sharing folder on Windows with Command Prompt

To stop a shared folder with Command Prompt on Windows 11, use these steps:

  1. Open Start.

  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

  3. Type the following command to see the shared folders on Windows 11 and press Enter:

    net share
  4. Type the following command to stop sharing a specific folder with Command Prompt and press Enter:

    net share myShare /delete

    Stop sharing folder using Command Prompt

    In the command, change myShare for the name of the shared folder.

After you complete the steps, the specified folder will stop being accessible from the network.

Stop sharing folder on Windows with PowerShell

To stop sharing a folder with PowerShell commands, use these steps:

  1. Open Start.

  2. Search for PowerShell, right-click the top result, and select the Run as administrator option.

  3. Type the following command to see the shared folders on Windows 11 and press Enter:

    Get-SmbShare
  4. Type the following command to stop sharing a specific folder with PowerShell and press Enter:

    Remove-SmbShare -Name "myShare"

    In the command, change myShare for the name of the shared folder.

    PowerShell stop sharing folder command

  5. Type A and press Enter to confirm.

Once you complete the steps, the PowerShell command will stop sharing the folder in the network.

About the author

Mauro Huculak is a Windows How-To Expert who started Pureinfotech in 2010 as an independent online publication. He has also been a Windows Central contributor for nearly a decade. Mauro has over 15 years of experience writing comprehensive guides and creating professional videos about Windows and software, including Android and Linux. Before becoming a technology writer, he was an IT administrator for seven years. In total, Mauro has over 21 years of combined experience in technology. Throughout his career, he achieved different professional certifications from Microsoft (MSCA), Cisco (CCNP), VMware (VCP), and CompTIA (A+ and Network+), and he has been recognized as a Microsoft MVP for many years. You can follow him on X (Twitter), YouTube, LinkedIn and About.me. Email him at [email protected].