New-NfsShare
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]
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.
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.
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.
Grants the UNIX root user access to a share.
Type: | Boolean |
Position: | 10 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the group identifier (GID) that Server for NFS uses for anonymous users who access an NFS share.
Type: | Int32 |
Position: | 6 |
Default value: | -2 |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the user identifier (UID) that Server for NFS uses for anonymous users who access an NFS share.
Type: | Int32 |
Position: | 5 |
Default value: | -2 |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
ps_cimcommon_asjob
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies an array of authentication types that an NFS client can use to access NFS shares.
Valid values are: -- Sys (AUTH_SYS authentication)
- Krb5 (Kerberos v5 authentication)
- Krb5i (Kerberos v5 authentication with integrity checking)
- Krb5p (Kerberos v5 authentication with privacy)
- All
- Default
If you specify All, Server for NFS configures Sys, Krb, Krbi, and Krbp on the share. If you specify Default, Server for NFS configures Sys, Krb, and Krbi on the share.
Type: | String[] |
Position: | 4 |
Default value: | Default |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSessionhttp://go.microsoft.com/fwlink/p/?LinkId=227967 or Get-CimSessionhttp://go.microsoft.com/fwlink/p/?LinkId=227966 cmdlet. The default is the current session on the local computer.
Type: | CimSession[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Configures an NFS share to allow anonymous users to access it.
Type: | Boolean |
Position: | 8 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Configures an NFS share to allow unmapped UNIX users to access a share by using the UID or GID.
Type: | Boolean |
Position: | 9 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies language encoding to configure on an NFS share. You can use only one language on the share.
Valid values are:
- Euc-jp (Japanese)
- Euc-tw (Chinese)
- Euc-kr (Korean)
- Shift-jis (Japanese)
- Big5 (Chinese)
- Ksc5601 (Korean)
- Gb2312-80 (Simplified Chinese)
- Ansi
Type: | String |
Position: | 7 |
Default value: | Ansi |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the name of the NFS share to create.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the network name of a share.
For a local share, the network name is the host name. For a server cluster, the network name is the network name in the resource group to which the share is scoped.
This parameter is not required when you create a local share. In the case of a server cluster, specify the client access point. If you do not specify a network name, New-NfsShare assigns a network name that belongs to the same resource group by default.
Type: | String |
Position: | 3 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the path of a new NFS share.
Type: | String |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Configures the type of global ("All Machines") permissions on the NFS share. The acceptable values for this parameter are:
- Readwrite
- Readonly
- No-access
Type: | String |
Position: | 11 |
Default value: | No-access |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the maximum number of concurrent operations that can be established to run the cmdlet.
If this parameter is omitted or a value of 0
is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer.
The throttle limit applies only to the current cmdlet, not to the session or to the computer.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |