Set-NfsShare
Set-NfsShare
Changes configuration settings of an NFS share.
Syntax
Parameter Set: ByName
Set-NfsShare [-Name] <String> [[-Authentication] <String[]> ] [[-EnableAnonymousAccess] <Boolean> ] [[-EnableUnmappedAccess] <Boolean> ] [[-AnonymousGid] <Int32> ] [[-AnonymousUid] <Int32> ] [[-LanguageEncoding] <String> ] [[-AllowRootAccess] <Boolean> ] [[-Permission] <String> ] [-AsJob] [-CimSession <CimSession[]> ] [-NetworkName <String> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: ByPath
Set-NfsShare [-Path] <String> [[-Authentication] <String[]> ] [[-EnableAnonymousAccess] <Boolean> ] [[-EnableUnmappedAccess] <Boolean> ] [[-AnonymousGid] <Int32> ] [[-AnonymousUid] <Int32> ] [[-LanguageEncoding] <String> ] [[-AllowRootAccess] <Boolean> ] [[-Permission] <String> ] [-AsJob] [-CimSession <CimSession[]> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Set-NfsShare cmdlet changes configuration settings for an existing share that Server for Network File System (NFS) exports. You can use the NetworkName parameter to select a share in a server cluster. NetworkName is not required when you modify configuration settings of non-clustered (standard) shares.
Parameters
-AllowRootAccess<Boolean>
Grants the UNIX root user access to a share.
Aliases |
none |
Required? |
false |
Position? |
8 |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-AnonymousGid<Int32>
Specifies the group identifier (GID) that Server for NFS uses for anonymous users who access an NFS share.
Aliases |
none |
Required? |
false |
Position? |
5 |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-AnonymousUid<Int32>
Specifies the user identifier (UID) that Server for NFS uses for anonymous users who access an NFS share.
Aliases |
none |
Required? |
false |
Position? |
6 |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-AsJob
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Authentication<String[]>
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, Krb5, Krb5i, and Krb5p on the share. If you specify Default, Server for NFS configures Sys, Krb5, and Krb5i on the share.
Aliases |
none |
Required? |
false |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-CimSession<CimSession[]>
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-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-EnableAnonymousAccess<Boolean>
Configures the NFS share to allow anonymous users to access it.
Aliases |
none |
Required? |
false |
Position? |
3 |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-EnableUnmappedAccess<Boolean>
Configures the NFS share to allow unmapped UNIX users to access the share by using a UID or GID.
Aliases |
none |
Required? |
false |
Position? |
4 |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-LanguageEncoding<String>
Specifies the 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
Aliases |
none |
Required? |
false |
Position? |
7 |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Name<String>
Specifies the name of an NFS share to modify.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-NetworkName<String>
Specifies the network name of the share. You cannot change the network name of an existing 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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Path<String>
Specifies the path of an NFS share.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
true |
-Permission<String>
Configures the type of global ("All Machines") permissions on the NFS share. The acceptable values for this parameter are:
-- Readwrite
-- Readonly
-- No-access
Valid values are:
-- Readwrite
-- Readonly
-- No-access
Aliases |
none |
Required? |
false |
Position? |
9 |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-ThrottleLimit<Int32>
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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
Example 1: Enable unmapped user access on an NFS share
This command enables unmapped users to access the NFS share NFSshare01.
PS C:\> Set-NfsShare -Name "NFSshare01" -EnableUnmappedAccess $true
Example 2: Set the authentication protocol of an NFS share
This command sets the authentication protocol as AUTH_SYS and Kerberos v5 on the NFS share NFSshare01. The command also sets the anonymous UID to 100 and the anonymous GID to 200.
PS C:\> Set-NfsShare -Name "NFSshare01" -Authentication sys,krb5 -AnonymousUid 100 -AnonymousGid 200