Torna al Blog

    Install the NFS Server service on Windows Server 2012 via PowerShell

    2 settembre 2013
    Install the NFS Server service on Windows Server 2012 via PowerShell

    The NFS Server role of Windows Server 2012 can be installed entirely from PowerShell, without going through Server Manager.

    Open PowerShell as Administrator and run the following commands:

    Import-Module ServerManager
    Add-WindowsFeature FS-NFS-Service
    Import-Module NFS

    To create a share, for example exporting the folder C:\archive\test under the name nfstest:

    New-NfsShare -Name nfstest -Path C:\archive\test

    The share is immediately available to NFS clients; use Get-NfsShare to list the existing exports and Grant-NfsSharePermission to control which hosts can mount them.