我一直在使用 robocopy 和映射网络驱动器将不受信任的 Windows 域中的备份复制到一个中心位置,然后将它们推送到 Ubuntu 存储设备,我遇到了很多异常情况。我现在看到的一个是映射的网络驱动器,它似乎在任何用户上下文中都不存在。这些都是以我个人身份执行的,或者“以管理员身份运行”,两者都有相同的结果。
请注意,这在 Powershell 中有效,但在 CMD 中无效。
删除所有映射的驱动器:
Z:\Scripts>net use * /delete
There are no entries in the list.
尝试明确删除 W: drive
Z:\Scripts>net use w: /delete /y
The network connection could not be found.
More help is available by typing NET HELPMSG 2250.
尝试将目录更改为映射驱动器,注意登录失败
Z:\Scripts>w:
Logon failure: unknown user name or bad password.
再次尝试删除
Z:\Scripts>net use W: /delete /y
The network connection could not be found.
More help is available by typing NET HELPMSG 2250.
没有显示连接
Z:\Scripts>net use
New connections will not be remembered.
There are no entries in the list.
W:驱动器不存在
Z:\Scripts>net use W: /delete /Y
The network connection could not be found.
More help is available by typing NET HELPMSG 2250.
尝试将驱动器映射到它
Z:\Scripts>NET use W: \\servername\sharename PASSWORD /user:domain\username
System error 85 has occurred.
The local device name is already in use.