Powershell 挂载 NFS 的选项

ccl*_*oyd 3 powershell nfs

我尝试使用选项在 Windows 上挂载 NFS 共享,但出现错误。

PS C:\Users\cclloyd> mount 10.0.40.1:/srv/Config H: -o nolock
New-PSDrive: Parameter cannot be processed because the parameter name 'o' is ambiguous. Possible matches include: -OutVariable -OutBuffer.
Run Code Online (Sandbox Code Playgroud)

为什么我会收到此错误?所有指南和教程都表明该命令运行良好。我也在 Windows 中安装了所有 NFS 服务。

use*_*686 6

所有指南和教程都在讨论该程序,但您实际上从 PowerShell 调用的是 PowerShell cmdlet的mount.exe内置别名New-PSDrive

\n

改为运行该程序mount.exe

\n

或者,使用删除别名Remove-Item -Path Alias:mount -ErrorAction Ignore(例如,您可以将其放入 PowerShell $profile 脚本中)。

\n
\n

微软似乎并不真正关心Windows \xe2\x80\x93 中的 NFS 客户端,它似乎几乎停留在“Windows 2000 和 Interix”时代。(尽管 Windows 具有 NFSv4 服务器,但没有 NFSv4 客户端支持...)如果可以在文件服务器上安装 Samba,则使用 SMBv3 可能会获得更好的结果。

\n