這一新PSDrive來命令淨使用* /刪除/ Y不解決錯誤「新PSDrive來:到服務器的多個連接......」
New-PSDrive -Name Z -PSProvider FileSystem -Root \\$j\share -Credential $credentials -ErrorAction Stop
導致錯誤
New-PSDrive : Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the
server or shared resource and try again
我已經嘗試了第一斷開所有驅動器,然後創建新的驅動器,
net use * /delete /y
New-PSDrive -Name Z -PSProvider FileSystem -Root \\$j\share -Credential $credentials -ErrorAction Stop
我得到的輸出
You have these remote connections:
\\TSCLIENT\C
\\TSCLIENT\D
\\TSCLIENT\E
\\TSCLIENT\I
\\TSCLIENT\J
\\TSCLIENT\K
\\TSCLIENT\L
\\TSCLIENT\R
\\TSCLIENT\T
Continuing will cancel the connections.
The command completed successfully.
New-PSDrive : Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the
server or shared resource and try again
我還試圖消除Z驅動第一
Remove-PSDrive -name Z
New-PSDrive -Name Z -PSProvider FileSystem -Root \\$j\share -Credential $credentials -ErrorAction Stop
而得到錯誤
Remove-PSDrive : Cannot find drive. A drive with the name 'Z' does not exist.
...
New-PSDrive : Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the
server or shared resource and try again
如何解決?
UPDATE
我甚至重新啓動機器,改變了驅動器名,但我仍然得到同樣的錯誤「新PSDrive來:多個連接......」
更新2
我也嘗試使用IP地址而不是計算機名稱,但這也不起作用,http://support.microsoft.com/kb/938120
這不是關於目標共享拒絕你的嘗試而不是你的本地機器拒絕掛載'Z'的消息嗎?如果你斷開連接然後嘗試?什麼存儲在變量'$ j'中? – arco444 2014-09-23 13:44:34
如果您在Windows資源管理器中打開目標驅動器,也可能發生這種情況。映射驅動器或不。 – Matt 2014-09-23 13:47:29
@ arco444'$ j'是計算機名稱。 – Glowie 2014-09-23 13:59:57