Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Set-NfsShare

Set-NfsShare

msft_nfsservertasks.cmdletdefinition.cdxml

Synopsis

Changes configuration settings of an NFS share.

Syntax

Set-NfsShare [-Name] [-Authentication] [-EnableAnonymousAccess] [-EnableUnmappedAccess] [-AnonymousGid] [-AnonymousUid] [-LanguageEncoding] [-AllowRootAccess] [-Permission] [-AsJob] [-CimSession] [-NetworkName] [-ThrottleLimit] [-Confirm] [-WhatIf] [<CommonParameters>]

Set-NfsShare [-Path] [-Authentication] [-EnableAnonymousAccess] [-EnableUnmappedAccess] [-AnonymousGid] [-AnonymousUid] [-LanguageEncoding] [-AllowRootAccess] [-Permission] [-AsJob] [-CimSession] [-ThrottleLimit] [-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

AnonGid

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

AnonUid

Required?

false

Position

6

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-AsJob <SwitchParameter>

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete. The cmdlet immediately returns an object that represents the job and then displays the command prompt. You can continue to work in the session while the job completes. To manage the job, use the *-Job cmdlets. To get the job results, use the Receive-Job cmdlet. For more information about Windows PowerShell® background jobs, see about_Jobs.

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

af,auth

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

Session

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

anon,AnonymousAccess

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

unmapped,UnmappedAccess

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

lang,encoding

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

ShareName

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

netname

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

SharePath

Required?

true

Position

1

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-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

access

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 <SwitchParameter>

Prompts you for confirmation before running the cmdlet.

Aliases

None

Required?

false

Position

named

Default value

false

Accept pipeline input?

false

Accept wildcard characters?

false

-WhatIf <SwitchParameter>

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Aliases

None

Required?

false

Position

named

Default value

false

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type


Return Type


Notes

None

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

Online Version
Get-NfsShare
New-NfsShare
Remove-NfsShare