PowerShell Logo Small


This is the built-in help made by Microsoft for the command 'New-NfsShare', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.


Creates an NFS file share.


New-NfsShare [-Name] <String> [[-AllowRootAccess] <Boolean>] [[-Permission] <String>] [-Path] <String> [[-NetworkName] <String>] [[-Authentication] <String[]>]
[[-AnonymousUid] <Int32>] [[-AnonymousGid] <Int32>] [[-LanguageEncoding] <String>] [[-EnableAnonymousAccess] <Boolean>] [[-EnableUnmappedAccess] <Boolean>] [-AsJob]
[-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]

Search powershellhelp.space


The New-NfsShare cmdlet creates a Network File System (NFS) file share. To create a share, you must specify a name and a path. If you do not use the optional parameters for
this cmdlet, New-NfsShare assigns default values for these share settings.

If you specify a path to a clustered disk for a new NFS share, this cmdlet creates a highly available clustered share. You can use the NetworkName parameter to scope a share
to a specified network name. The network name must belong to the same resource group as the clustered disk. If you do not specify the network name, New-NfsShare assigns an
arbitrary network name that is available in the same resource group to scope the share.



Online Version: http://go.microsoft.com/fwlink/?linkid=287498




Example 1: Create an NFS share for a folder

PS C:\> New-NfsShare -Name "NFSshare01" -Path "C:\shares\NFSshare01"
Name : nfsexport
Path : C:\shares\nfsexport
NetworkName : GAPRASAD-TST22
Availability : Standard (not clustered)
Online : True
AnonymousAccess : Disabled
AnonymousGID : -2
AnonymousUID : -2
UnmappedUserAccess : Enabled
Authentication : {sys, Krb5, Krb5i}

This command creates an NFS share named NFSshare01 for sharing the folder C:\shares\NFSshare01.

Example 2: Create an NFS share that has unmapped access

PS C:\> New-NfsShare -Name "NFSshare01" -Path "C:\shares\NFSshare01" -EnableUnmappedAccess $true -Authentication krb5,krb5i

This command creates an NFS share named NFSshare01 for sharing the folder C:\shares\ NFSshare01. This command enables unmapped access on the new share and configures Krb5
and Krb5i authentication on the share.