Remove access

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

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.