/
/

How to Delete a Network Share on Windows 11

by Lauren Ballejos, IT Editorial Expert
How to Delete a Network Share on Windows 10 and Windows 11 blog banner image

Instant Summary

This NinjaOne blog post offers a comprehensive basic CMD commands list and deep dive into Windows commands with over 70 essential cmd commands for both beginners and advanced users. It explains practical command prompt commands for file management, directory navigation, network troubleshooting, disk operations, and automation with real examples to improve productivity. Whether you’re learning foundational cmd commands or mastering advanced Windows CLI tools, this guide helps you use the Command Prompt more effectively.

Key Points

  • Deleting a mapped network share in Windows 11 removes the drive reference from your system without deleting the actual shared files.
  • Disconnect mapped drives in File Explorer by opening This PC, right-clicking the network location under “Network locations,” and selecting Disconnect.
  • Remove mapped drives via Command Prompt using net use DRIVE_LETTER: /delete or via PowerShell using Remove-PSDrive -Name DRIVE_LETTER.
  • Delete shortcuts to network shares from the Desktop or Quick Access by right-clicking and selecting Delete, just like any other shortcut.
  • Run Command Prompt or PowerShell as Administrator if a mapped drive does not disappear, and ensure persistent mappings are removed to prevent reappearance after reboot.

This guide demonstrates how to delete a network share on Windows 10 and Windows 11 with step-by-step instructions for removing mapped network drives. It explains several methods, additional tools, and how to troubleshoot network share deletion.

If you prefer watching over reading, watch How to Delete a Network Share on Windows 11.

What are Windows network shares

A network share allows access to files and folders between computers over a local network or VPN. Network shares are commonly used in business and education environments to share files between users for collaboration and to keep them stored in a safe, controlled (and backed-up) location. They are also increasingly common at home when connected to VPNs for remote work or sharing media with smart devices.

On Windows, it is common practice to permanently assign a network share to a local drive letter so that it’s always available in Windows Explorer. By doing this, the network share can be accessed just like your regular hard drive or a plugged-in USB stick using a drive letter (for example, instead of having to go to the network location \serverpathtoshare you can just navigate to the share mapped to the Z: drive). This is known as mapping a network drive. This saves the time and hassle of having to manually navigate to the network share (or type it in).

Network shares can become disconnected or unnecessary. The share location may change. Your access permissions may be removed. You may no longer need the files.

In some cases, a Windows machine hosts a share on an external device that is later removed. The share remains listed but is no longer accessible.

Even when the share that was mapped to a network drive has been deleted, the mapped network drive needs to be manually removed.

Manage Windows endpoints with the #1-rated Windows RMM solution by G2.

Get started with NinjaOne Windows RMM.

Step-by-step guide to deleting network shares

To remove a network share on Windows, follow the relevant instructions below. If these basic instructions do not work for you, follow on for further troubleshooting steps using the Command Line. You can also use the video guide How to View All Network Shares on a Windows PC to help locate the shares you want to remove.

How to delete network share mapping in Windows 11

The process to delete a network share that is mapped to a drive letter on Windows 11 is as follows:

  • Open the File Explorer by right-clicking on the Start button and selecting it from the list.
  • In the left navigation pane, click This PC.
  • Under Network locations, right-click on the mapped network share that you want to remove.
  • Click Disconnect.

How to delete network share mapping in Windows 11

This will remove the mapped shared drive, freeing up the drive letter for use. To restore the network drive, you will need to navigate back to its network address and re-map it.

Deleting mapped network shares from the Command Prompt

To delete Windows shares that you’ve mapped to a network drive, use the net use command:

net use DRIVE_LETTER: /delete

Replace DRIVE_LETTER with the mapped network drive letter you want to delete (note that you also need to include the colon symbol).

For example, to delete a mapped network drive at the location Z:, run the following command:

net use Z: /delete

Deleting mapped network shares from PowerShell

To delete a mapped network drive in PowerShell, use the Remove-PSDrive cmdlet with the following syntax:

Remove-PSDrive -Name DRIVE_LETTER

Unlike net use, you don’t include the colon with the drive letter when running this command. For example, to delete the Z drive network share mapping, you would run:

Remove-PSDrive -Name Z

Tip: If the mapped drive was created with the “Reconnect at sign-in” option or the -Persist parameter, it may reappear after reboot. To prevent this, uncheck the option when mapping drives or remove the persistent entry from the registry.

Deleting network share shortcuts

If you have a shortcut to a network share on your Desktop or pinned to Quick Access in Windows Explorer, you can simply right-click to delete it as you would any other shortcut.

Troubleshoot network share deletion

If a mapped share does not disappear after deletion, try running Command Prompt or PowerShell as Administrator to remove it. To do this, right-click on the Start menu and open the Command Prompt or PowerShell as Admin, and then run the above commands.

A network share that has had its drive mapping removed will no longer appear in Explorer under This PC. Once you delete a mapped network share on Windows, any shortcuts you have created to files or folders on it will stop working.

Deleting a mapped network drive does not delete the files on it, it’s just removing the reference to it. Deleting files stored in a network share does delete them from the share, possibly permanently. A robust backup solution will protect you from accidental data loss if you are sharing files among multiple users.

🥷 NinjaOne offers automated, centralized, and reliable data protection.

Learn more about NinjaOne Windows Endpoint Backup.

Need to remove an old network share? Watch how to delete a network share on Windows 10 and 11.

Efficiently managing and securing Windows Shares at scale

When managing network shares and drive mappings across multiple devices, you must control access and protect files.

Grant users access only to the files they need. This reduces the risk of data exposure or leaks. Enforce permissions across the network to prevent users from modifying or disrupting others’ work.

Use centralized file shares to back up critical data and active projects. This protects essential information and supports business continuity.

NinjaOne provides a unified remote monitoring and management solution that automates and streamlines your IT operations, granting you visibility over your entire IT portfolio and ensuring that security policies are deployed and enforced.

This guide on managing network shares is a part of a wider set of IT management best practices. To learn more about how to streamline your operations, consider exploring our comprehensive resources on IT asset management and its frequently asked questions.

FAQs

No. Removing a mapped drive only deletes the reference on your computer; it does not delete any files stored on the network share.

Open Command Prompt and run net use DRIVE_LETTER: /delete, replacing DRIVE_LETTER with the mapped drive letter, including the colon.

The drive was likely mapped with the “Reconnect at sign-in” option or a persistent setting, which automatically restores it after reboot.

Open Command Prompt or PowerShell as Administrator and rerun the removal command to force deletion of the mapped share.

You might also like

Ready to simplify the hardest parts of IT?