Windows 10 отключить сетевой диск cmd

Подключить сетевой диск из командной строки просто:

net use \ \<Имя компьютера>\<сетевое имя папки> :<Имя локального диска>

А вот как произвести обратную операцию, не используя графический интерфейс Windows?

Для отключения сетевого диска с помощью командной строки, необходимо ввести команду:

net use <буква_сетевого_диска:> /DELETE


Например: вы подключили сетевой диск R:

net use R: \\192.168.1.2\d$

следовательно, отключение данного диска производиться командой:

net use R: /DELETE

Если при подключении сетевых дисков вы использовали параметр /PERSISTENT:YES (Например: net use R: \\192.168.1.2\d$ /PERSISTENT:YES) то, для полного отключения данного диска (что бы данный диск не появлялся после перезагрузки) необходимо после /DELETE так же указывать /PERSISTENT:YES. (Например: net use R: /DELETE /PERSISTENT:YES)

автор вопроса выбрал этот ответ лучшим

-Irink­a-
[312K]

4 года назад 

Произвести отключение сетевого диска можно через командную строку, задав в неё команду.

Если вы не знаете, как вызвать командную строку, тогда я напишу сочетание клавиш при одновременном нажатии на них на экране появляется командная строка.

  • Нажимаем на клавиши «Ctrl» + «Shift» + «Enter» одновременно, после чего появится командная строка.

  • Пишем в командную строку команду «net use (название диска) /DELETE».

Вот и всё, таким образом, вы отключите сетевой диск.

Команда «Net use» доступна в версиях Windows XP и выше. Служит для вывода информации о сетевых подключениях, а также для управления ими.

Эту команду можно задать без параметров (для отображения информации) и с различными параметрами. «Delete» — один из параметров. С его помощью можно отключить сетевое подключение. Если указана звездочка, то будут отменены все подключения. Пример использования:



kelly­milen­a
[251K]

4 года назад 

В сценариях и пакетных файлах часто используется, кроме прочих функций, для вывода нужной информации о подключениях компьютера, данная распространенная команда. Это Net Use. С помощью данной команды выполняется отключение в Windows сетевого диска. Он представляет собой в этой операционной системе раздел данных , находящийся физически на ином компьютере вашей локальной сети.

Отключение сетевого диска фактически означает, что с данным ресурсом уже не связана, буква, которая присвоена общему ресурсу. Однако все же из папки под названием «Мое сетевое окружение» доступ для работы к нему вполне возможен. Вызываем для выполнения этого действия ( его отключения) и вызова программы зажатием поочередно клавиш Ctrl+Shift+Enter для работы с командной строкой.

Здесь набираем следующую команду, которая выглядит как net use D:/DELETE», где D- название диска либо имеющегося у вас.

Сетевой диск действительно можно из командной строки отключить и сделать это просто.

Сначала вызываем комендную строку нажимая клавиши ctrl и shift, третья enter.

Нажимаем сочетание одновременно.

Затем вписываем команду net use (буква нужного диска, например E)/ delete (удалить в переводе).

Выглядеть команда может и вот так:

net use E:/del

alexm­12
[288K]

9 лет назад 

Если уж вы добрались до командной строки, то глупо было не воспользоваться командой

«net use /?». Там система все бы вам о этой команде рассказала.

Опять же,

неверный формат команды, о чем можно было бы узнать из того же источника. Система просто ругнется на неправильный синтаксис.

teste­r9
[82.4K]

9 лет назад 

Отключить сетевой диск из командной строки Windows еще проще.

При этом, разумеется, неважно, каким методом этот сетевой диск был подключен, из командной строки или через графический интерфейс.

В командной строке набираете

Можно отключть все подключенные шаренные ресурсы:

Алекс­98
[61.5K]

4 года назад 

Отключить сетевой диск благодаря командной строке можно следующим образом.

Вызываем командную строку.

Пишем: «net use (название диска) /DELETE».

Например, у меня диск «D». Тогда команда будет:

«net use D:/DELETE».

Думаю, все довольно-таки просто.

Барха­тные лапки
[509K]

4 года назад 

Сделать это не так и сложно, нужно лишь выполнить некоторые действия.

Открываем командную строку, для этого нам нужно использовать такую комбинацию клавиш: «Ctrl» + «Shift» + «Enter».

После этого прописываем в командной строке следующую команду:

Как видим все достаточно просто.

Точно в цель
[125K]

4 года назад 

Для того, чтобы отключить сетевой диск из командой строки вы должны зайти в командную строку. Вызывается командная строка сочетанием клавиш Ctrl+Shift+Enter.

Далее вписывайте следующую команду, чтобы отключить сетевой диск из командной строки:

net use (название диска) /DELETE

Знаете ответ?

Или вы можете использовать команду Windows “net use” и опцию “delete”, чтобы отключить соответствующий сетевой диск.

Это приведет к выходу из сетевого хранилища из Windows 10. Обратите внимание, что после такого отключения для повторного доступа к сетевому хранилищу потребуется повторно ввести данные для входа в систему.

Была ли эта статья полезной? Да / Нет

Не связано с моей проблемой

Слишком сложно

Неправильная информация

Недостаточно информации

У вас есть другое отзывы об этой статье?

Email

Предложите тему

When you want to remove network drives from your Windows 10 or 11 computer you could use explorer. Another option is to use the Net Use command. This way you can remove all network connections easily with a single command on your own computer a remove one.

In this article, I will explain how you can use the Net Use Delete command to remove a single, or all network connections.

Before we are going to remove the network connections, let’s first take a look at the existing network connections on our computer with Net Use. You can use the Net Use command in Command Prompt or in Windows PowerShell.

To list all existing connections type:

Net use
net use delete

List existing connections with Net use

Remove a single network connection

To remove a single network connection with net use we can type net use x: /delete. Where x: is the drive letter of the network drive that you want to remove:

Net use x: /delete

# or in short
net use x: /d

Delete Network Connection without a drive letter

On some occasions, you might have a network connection without a drive letter. These connections can also be removed with the net use command. Instead of using the drive letter we then have to use the remote path.

So the remove the drive mapping to \\LT3452\C$\temp from the above screenshot we can use the following command:

net use \\LT3452\c$\temp /delete
net use delete all

Net Use Delete All

It’s also possible to delete all active network connections from a computer. For this, we can use the command net use * /delete.

net use * /delete

# or in short:
net use * /d

Net use * /delete Force

When you run the delete command with the wildcard to delete all connections, you will be prompted to confirm the deletion. To force the delete command we can add the parameter /yes to it to delete the network connections silently:

# Force delete of all network connections
net use * /delete /yes

# or in shot:
net use * /d /y

Wrapping Up

The net use delete command is really useful when you want to clean up network connections on a computer with a script or before you apply new network connections. If you want to learn more about the command net use, then make sure you read this article where I explain more about it.

If you have any questions, just drop a comment below!

You may also like the following articles

Remove network drive on Windows 10

Remove network drive on Windows 10
  • To remove network drive on Windows 10, open “This PC” on File Explorer, right-click the mapped drive, and select the “Disconnect” option.
  • Or, on Command Prompt, run the “net use d: /delete” command.
  • Or you can also remove a network drive from the Registry.

On Windows 10, the ability to map a drive allows you to create quick access to files stored on another device connected to the network. However, it’ll come a time when you may need to remove a mapped network drive because you no longer need it, settings are changing in the network or disconnect and reconnect to troubleshoot a mapping problem.

Whatever the reason, Windows 10 includes the ability to map and disconnect (unmap) a network drive using File Explorer, Command Prompt, and even the Registry (if the first two methods don’t work).

This guide will teach you three ways to remove a network drive on Windows 10.

  • Disconnect mapped network drive on Windows 10 from File Explorer
  • Disconnect mapped network drive on Windows 10 from Command Prompt
  • Disconnect mapped network drive on Windows 10 from Registry

Disconnect mapped network drive on Windows 10 from File Explorer

To remove a network drive on Windows 10 from File Explorer, use these steps:

  1. Open File Explorer on Windows 10.

  2. Click on This PC from the left pane.

  3. Under the “Network locations” section, right-click the mapped drive and select the Disconnect option.

    Disconnect mapped network drive using File Explorer

Once you complete the steps, the network drive will no longer be available on the computer.

Disconnect mapped network drive on Windows 10 from Command Prompt

To remove a mapped network drive from Command Prompt, 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 delete the mapped network drive on Windows 10 and press Enter:

    net use z: /delete

    In the command, replace the “z” with the mapped drive letter to remove.

    Delete mapped network drive using Command Prompt

  4. Restart your computer.

After you complete the steps, the mapped network drive should no longer be available on your device.

Disconnect mapped network drive on Windows 10 from Registry

Alternatively, if you have issues disconnecting the mapped drive (such as the error message “This network connection doesn’t exist”), then you can use the Registry with the steps:

Warning: Modifying system files can damage your Windows installation if done incorrectly. It’s assumed that you know what you’re doing and have previously created a full backup of your computer. Proceed with caution and use this as the last course of action.

  1. Open Start.

  2. Search for regedit and click the top result to open the Registry.

  3. Browse the following path:

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2
  4. Right-click the mapped drive that you want to remove. For example, right-click ##Server_Name#Share_Name, then click the Delete option.

    Remove mapped network drive using Registry

  5. Click the Yes button.

  6. Browse the following path:

    HKEY_CURRENT_USER\Network
  7. Right-click and delete the network share that refers to the mapped drive. For example, in this case, the “Z” key.

    Delete mapped network drive from File Explorer using Registry

  8. Click the Yes button.

  9. Restart your computer.

Once you complete the steps, the network drive should disappear from File Explorer, enabling you to map the drive again or continue without it.

Mauro Huculak is a
Windows How-To Expert and founder of

Pureinfotech
(est. 2010). With over 21 years as a technology writer and IT Specialist,
Mauro specializes in Windows, software, and cross-platform systems such as Linux, Android, and macOS.

Certifications:

Microsoft Certified Solutions Associate (MCSA),


Cisco Certified Network Professional (CCNP),


VMware Certified Professional (VCP),
and

CompTIA A+ and Network+.

Mauro is a recognized Microsoft MVP and has also been a long-time contributor to Windows Central.

You can follow him on

YouTube,
Threads,
BlueSky,
X (Twitter),
LinkedIn and
About.me.
Email him at [email protected].

After we posted the methods to map network drive using cmd commands we come this time with the method to unmap network drive using net use command. Certainly, you need some time to disconnect some of the mapped drives.   This is a different method from the standard and easy one using the explore the interface. Mostly used to automate processes on your network environment.

Read here: how to map network drive using cmd commands

Unmap Network Drive Command Line

How to unmap network drive using cmd commands “net use delete”

The following method uses a command prompt (cmd) to remove network drive from the computer.

  1. Open the command prompt by searching for cmd on windows search. Open with “run as admin” by right click it.
  2. Copy and paste the below commands
net use T:  /delete

Note! Edit the T: on the example above with your network drive

You will receive a confirmation that the mapped network drive has been deleted successfully.  Go to the file explorer to check and the mapped drive will be removed. Keep in mind that this command will delete only map drive that uses a letter and not for mappings as an FTP server or web server.

unmap network drive using cmd

unmap network drive using cmd

How to remove all mapped network drive on certain computer

What if you will need to delete all the mapped network drive from a certain computer? For this case come in help the “*” string.

So use the below command:

net use *  /delete.

This command will ask you for confirmation before removing all the mapped drive and you will need to type “Y” to confirm ore “N” to decline.

You want to include the above task on the command? Yes sure use the below command in order to not prompt for confirmation:

net use *  /delete /y

unmap all network drive using cmd

unmap all network drive using cmd

How to delete mapped network drive using Regedit

Another method te delete mapped network drive is the regedit. To do this:

  1. Open Regedit by searching it on windows search.
  2. Navigate to the following path – HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2
  3. On the mapped network drive that you want to delete, right-click, and delete.
  4. Browser to the next path –  Computer\HKEY_CURRENT_USER\Network
  5. Right-click on the network share that you want to delete and select delete
  6. Restart the computer

After the restart, the mapped network drive will be removed from the File Explorer.

remove network drive using Regedit

remove network drive using Regedit

Batch file to unmap network drive

If you are on-network environment and you will need to remove the mapped network drive to all computers, the following method will come in help. You can schedule this bat file to run on GPO or any other platform used to manage computers.  Open notepad and save the below command as remove_map.bat

@echo remove network drive T:/
net use T:  /delete.
:exit

The following script will delete all mapped network drive without prompt

@echo remove all network drive
net use *  /delete /y
:exit

How to Unmap network drive using Powershell

Instead of Command prompt, you can use also PowerShell. Powershell uses different commands like below:

Remove-PSDrive -Name T

Bonus tip:

Before you execute the delete command you can show the current mapped drive using the below command:

Get-SmbMapping

delete network drive using powershell

delete network drive using PowerShell

Conclusion

We try to include all the methods using commands to unmap network drive from the computer. Let’s hope that you find it helpful.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • How to open python in windows
  • Что значит windows не активирован активируйте windows
  • Как открыть фото с расширением heic в windows 10
  • Как правильно создать установочную флешку windows 10
  • Команда windows route add