unc路径_如何在Windows中断开非映射的UNC路径“驱动器”的连接

unc路径_如何在Windows中断开非映射的UNC路径“驱动器”的连接

unc路径

Have you ever browsed over to another PC on your network using “network neighborhood”, and then connected to one of the file shares? Without a drive letter, how do you disconnect yourself once you’ve done so?

您是否曾经使用“网络邻居”浏览到网络上的另一台PC,然后连接到其中一个文件共享? 如果没有驱动器号,那么如何断开连接?

Really confused as to what I’m talking about? Let’s walk through the process. First, imagine that you browse through and connect to a share, entering your username and password to gain access.

我在说什么真的很困惑? 让我们逐步完成该过程。 首先,假设您浏览并连接到共享,然后输入用户名和密码来获得访问权限。

unc路径_如何在Windows中断开非映射的UNC路径“驱动器”的连接

The problem is that you stay connected, and there’s no visible way to disconnect yourself. If you try and shut down the other PC, you’ll receive a message that users are still connected. So let’s disconnect!

问题在于您保持连接状态,并且没有明显的方式可以断开自己的连接。 如果您尝试关闭另一台PC,则会收到一条消息,提示用户仍处于连接状态。 因此,让我们断开连接!

Open up a command prompt, and then type in the following:

打开命令提示符,然后键入以下内容:

net use

净使用

unc路径_如何在Windows中断开非映射的UNC路径“驱动器”的连接

This will give you a list of the connected drives, including the ones that aren’t actually mapped to a drive letter. To disconnect one of the connections, you can use the following command:

这将为您提供已连接驱动器的列表,包括实际上未映射到驱动器号的驱动器。 要断开其中一个连接,可以使用以下命令:

net use /delete \\server\sharename

净使用/删除\\服务器\共享名

For example, in this instance we’d disconnect like so:

例如,在这种情况下,我们将像这样断开连接:

net use /delete \\192.168.1.205\root$

净使用/删除\\ 192.168.1.205 \ root $

unc路径_如何在Windows中断开非映射的UNC路径“驱动器”的连接

Now when you run the “net use” command again, you’ll see that you’ve been properly disconnected.

现在,当再次运行“ net use”命令时,您将看到已正确断开连接。

unc路径_如何在Windows中断开非映射的UNC路径“驱动器”的连接

If you wanted to actually connect to a share without mapping a drive letter, you can do the following:

如果要实际连接到共享而不映射驱动器号,则可以执行以下操作:

net use /user:Username \\server\sharename Password

净使用/ user:用户名\\服务器\共享名密码

You could then just pop \\server\sharename into a Windows Explorer window and browse the files that way. Note that this technique should work exactly the same in any version of windows.

然后,您可以将\\ server \ sharename弹出到Windows资源管理器窗口中,然后以这种方式浏览文件。 请注意,此技术在任何版本的Windows中都应完全相同。

翻译自: https://www.howtogeek.com/howto/16196/how-to-disconnect-non-mapped-unc-path-drives-in-windows/

unc路径