5

I'm trying to mount an NFS share on Windows with options, but am getting an error.

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.

Why am I getting this error? All the guides and tutorials show this command working just fine. I have all NFS services installed in windows too.

1 Answer 1

8

All the guides and tutorials are talking about the mount.exe program, but what you're actually calling from PowerShell is a built-in alias to the New-PSDrive PowerShell cmdlet.

Run the program as mount.exe instead.

Alternatively, remove the alias using Remove-Item -Path Alias:mount -ErrorAction Ignore (e.g. you could put this in your PowerShell $profile script).


Microsoft doesn't really seem to care about the NFS client in Windows – it seems to be pretty much stuck in the "Windows 2000 and Interix" era. (There's no NFSv4 client support despite Windows having a NFSv4 server...) You will likely get better results by using SMBv3 if you can install Samba on your file server.

1
  • Thanks for sharing this. Is it also possible to enable write access through powershell as well? After I did your steps I didn't have write access. Commented May 12, 2022 at 9:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .