Install and Configure NFS Client on Windows / Windows / Windows 10 / Install and Configure NFS Client on Windows

The Network File System (NFS) client is not installed by default on Windows Server 2022/2019/2016/2012R2 and Windows 11/10 desktop versions. To install it, open the Server Manager and select Add Roles and Features -> Client for NFS.

Install Client for NFS on Windows

If you want to install graphical NFS management consoles (nfsmgmt.msc), select Services for Network File System Management Tools under Remote Server Administration Tools -> Role Administration Tools -> File Services Tools.

Install Services for Network File System Management Tools on Windows

Or you can use PowerShell to install the NFS client and management snap-in:

Install-WindowsFeature NFS-Client, RSAT-NFS-Admin

If you are running Windows 10 or 11, run the following to install the NFS client:

Enable-WindowsOptionalFeature -FeatureName ServicesForNFS-ClientOnly, ClientForNFS-Infrastructure -Online -NoRestart

The Windows NFS client supports NFSv2 and NFSv3 protocol verions.

Now you can mount the NFS share using PowerShell:

New-PSdrive -PSProvider FileSystem -Name M -Root \\\mnt\hyperv -Persist
Persist option allows to connect NFS shares automatically after a system reboot.

With CMD:

mount -o anon nolock \\\mnt\hyperv M:

You can also mount an NFS directory from the File Explorer GUI.

In order to disconnect NFS share, run:

Umount M:


Remove-PSdrive -Name M

An error may occur when mounting NFS shares:

The remote device or resource won’t accept the connection.

WIndows mount NFS error: The remote device or resource won’t accept the connection

To resolve the problem, start the Services for Network File System (NFS) console and check the permissions that you have to connect to the remote share.

If you want to connect to an NFS share as an anonymous user, there are two registry items that you will need to add:

New-ItemProperty HKLM:\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default -Name AnonymousUID -Value 000001f4 -PropertyType "DWord"
New-ItemProperty HKLM:\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default -Name AnonymousGID -Value 00000064 -PropertyType "DWord"

ClientForNFS: AnonymousUID and AnonymousGID attributes

If you always want to connect using the root account, change the AnonymousUID and AnonymousGID settings to 0.

When using NFS connections in an Active Directory environment, there’s an important caveat:

If UNIX attributes are not added to AD and user name mapping is not configured, an anonymous connection is used to connect to the NFS server from Windows. You need to make changes to the AD schema (attributes uidNumber and gidNumber) in order to use alternative credentials to connect to NFS folder.

On WS 2012R2 domain controllers, you can add the UNIX Attributes tab to the AD user properties in ADUC:

Dism.exe /online /enable-feature /featurename:adminui /all

However, this option is deprecated in Windows Server 2016, and it is suggested that user attributes be edited manually or using PowerShell:

Set-ADUser -identity user1 -add @{uidNumber="<user_unix_uid>";gidNumber="<user_unix_gid>"}

An error may also occur when mounting an NFS directory:

You can't access this shared folder because your organization's security policies block unauthenticated guest access. These policies help protect your PC from unsafe or malicious devices on the network

In this case, you must create the AllowInsecureGuestAuth registry entry.

New-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters -Name AllowInsecureGuestAuth -Value 00000001
New-ItemProperty HKLM:\ oftware\Policies\Microsoft\Windows\LanmanWorkstation -Name AllowInsecureGuestAuth -Value 00000001

Then restart the NFS service from the nfsmgmt.msc snap-in.

5 thoughts on “Install and Configure NFS Client on Windows”
  1. Windows PowerShell
    Copyright (C) Microsoft Corporation. All rights reserved.
    Install the latest PowerShell for new features and improvements! PS C:\WINDOWS\system32> Enable-WindowsOptionalFeature -FeatureName ServicesForNFS-ClientOnly, ClientForNFS-Infrastructure -Online -NoRestart Enable-WindowsOptionalFeature : Feature name ServicesForNFS-ClientOnly is unknown.
    At line:1 char:1
    + Enable-WindowsOptionalFeature -FeatureName ServicesForNFS-ClientOnly, …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Enable-WindowsOptionalFeature], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.EnableWindowsOptionalFeatureCommand

    PS C:\WINDOWS\system32>

  2. C:>mount -o anon nolock -o mtype=hard \\\mnt\storage\nfs\storage N:
    N: is now successfully connected to \\\mnt\storage\nfs\storage

    Local Remote Properties
    N: \\\mnt\storage\nfs\storag UID=-2, GID=-2
    rsize=262144, wsize=262144
    mount=hard, timeout=0.8
    retry=1, locking=no
    fileaccess=755, lang=ANSI

    I cannot see to get the UID or GID to be zero!

    Registry is correct…
    Windows Registry Editor Version 5.00


    Any idea what is going wrong?

  3. “The Windows NFS client supports NFSv2 and NFSv3 protocol verions” really???
    What is with NFS Version 4 (RFC 7530), hey microsoft, it is more than 10 years old… no time for implementation, yet?

  4. So everyone says -o, yet when I try that, I get New-PSDrive: Parameter cannot be processed because the parameter name ‘o’ is ambiguous. Possible matches include: -OutVariable -OutBuffer.
    I do not have a clue what this means.

Leave a Reply

Your email address will not be published. Required fields are marked *