【发布时间】:2013-06-06 21:04:19
【问题描述】:
我正在尝试在 PowerShell 2.0 中映射驱动器并收到此错误?
New-PSDrive –Name ftp –PSProvider FileSystem –Root “\\server\folder” -Credential $credential
The provider does not support the use of credentials. Perform the operation again without specifying credentials.
但是,Get-Help New-PSDrive 将 -Credential 显示为有效选项?
这是 PS 的版本问题吗?
有没有其他方法可以做同样的事情...我更愿意将它保存在 PS 中(因为驱动器只有 PS),而不是退出到NET USE - NET USE /d,但需要必须!
【问题讨论】:
-
仅供参考 这已在 3.0 中修复。
标签: powershell-2.0 drive-mapping