Export (0) Print
Expand All

Set-NfsServerConfiguration

Updated: October 15, 2012

Applies To: Windows Server 2012

Set-NfsServerConfiguration

Changes configuration settings for an NFS server.

Syntax

Parameter Set: InputObject (cdxml)
Set-NfsServerConfiguration [-AlwaysOpenByName <Boolean> ] [-AsJob] [-AuthenticationRenewalIntervalSec <UInt32> ] [-CharacterTranslationFile <String> ] [-CimSession <CimSession[]> ] [-ClearMappingCache] [-DirectoryCacheSize <UInt32> ] [-EnableAuthenticationRenewal <Boolean> ] [-EnableNFSV2 <Boolean> ] [-EnableNFSV3 <Boolean> ] [-EnableNFSV4 <Boolean> ] [-GracePeriodSec <UInt32> ] [-HideFilesBeginningInDot <Boolean> ] [-InputObject <CimInstance[]> ] [-LeasePeriodSec <UInt32> ] [-LogActivity <String[]> ] [-MapServerProtocol <String[]> ] [-MountProtocol <String[]> ] [-NetgroupCacheTimeoutSec <UInt32> ] [-Nfsprotocol <String[]> ] [-NisProtocol <String[]> ] [-NlmGracePeriodSec <UInt32> ] [-NlmProtocol <String[]> ] [-NsmProtocol <String[]> ] [-OnlineTimeoutSec <UInt32> ] [-PassThru] [-PortmapProtocol <String[]> ] [-PreserveInheritance <Boolean> ] [-ThrottleLimit <Int32> ] [-UnmappedUserAccount <String> ] [-WorldAccount <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

The Set-NfsServerConfig cmdlet changes the configuration settings for an existing Network File System (NFS) server.

For some changes to take effect, you must restart Services for NFS. The cmdlet prompts you to restart if necessary.

Parameters

-AlwaysOpenByName<Boolean>

Specifies whether an NFS server opens files and directories by name, instead of opening by file ID. You can enable this setting for compatibility with filter drivers that intercept requests for opening files and directories by file name, or for applications that rely on directory change notifications to work with NFS shares.

The default value is $False. By default, an NFS server opens files and directories by ID to improve performance.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-AsJob

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

-AuthenticationRenewalIntervalSec<UInt32>

Specifies an interval, in seconds, when an NFS server renews authentication.


Aliases

none

Required?

false

Position?

named

Default Value

600

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CharacterTranslationFile<String>

Specifies a path for a file that an NFS server uses for character translation.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

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

-ClearMappingCache

Specifies whether to clear the mapping and netgroup cache of an NFS server.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DirectoryCacheSize<UInt32>

Specifies the size of the directory cache, in kilobytes. This value is a multiple of 4.


Aliases

none

Required?

false

Position?

named

Default Value

128

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-EnableAuthenticationRenewal<Boolean>

Specifies whether an NFS server renews authentication when cached credentials expire.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-EnableNFSV2<Boolean>

Specifies whether an NFS server can export shares via the NFS v2 protocol.


Aliases

none

Required?

false

Position?

named

Default Value

3

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-EnableNFSV3<Boolean>

Specifies whether an NFS server can export shares via the NFS v3 protocol.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-EnableNFSV4<Boolean>

Specifies whether an NFS server can export shares via the NFS v4.1 protocol.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-GracePeriodSec<UInt32>

Specifies a grace period, in seconds, for an NFS server. During this period, clients can reclaim file locks. The value must be at least twice the value specified in the LeasePeriodSec parameter.

The grace period applies to clients connected via the NFS v4.1 protocol.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-HideFilesBeginningInDot<Boolean>

Specifies whether an NFS server creates files that have names that begin with a dot (.) as hidden files.


Aliases

none

Required?

false

Position?

named

Default Value

0

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-InputObject<CimInstance[]>

Specifies the input to this cmdlet. You can use this parameter, or you can pipe the input to this cmdlet.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-LeasePeriodSec<UInt32>

Specifies a lease period, in seconds, for an NFS server. The minimum value is 5. The maximum value is 300.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-LogActivity<String[]>

Specifies the activities that an NFS server logs for audit purposes. The acceptable values for this parameter are: 

-- Mount
-- Unmount
-- Read
-- Write
-- Create
-- Delete
-- Lock
-- Unlock
-- All
-- None

You can specify multiple values. Specify All to log all activities or None to log none of these activities.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MapServerProtocol<String[]>

Specifies one or more preferred underlying transport protocols that an NFS server uses for the User Name Mapping server (MAPSVR) protocol. You must specify at least one of these two values: Tcp and Udp.


Aliases

none

Required?

false

Position?

named

Default Value

3

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MountProtocol<String[]>

Specifies one or more preferred underlying transport protocols that an NFS server uses for the Mount protocol. You must specify at least one of these two values: Tcp and Udp.


Aliases

none

Required?

false

Position?

named

Default Value

3

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NetgroupCacheTimeoutSec<UInt32>

Specifies a time-out period, in seconds, for an NFS server. An NFS server enforces this time-out on entries in its netgroup cache.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Nfsprotocol<String[]>

Specifies one or more preferred underlying transport protocols that an NFS server uses for the NFS protocol. You must specify at least one of these two values: Tcp and Udp.


Aliases

none

Required?

false

Position?

named

Default Value

3

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NisProtocol<String[]>

Specifies one or more preferred underlying transport protocols that an NFS server uses for the Network Information System (NIS) protocol. You must specify at least one of these two values: Tcp and Udp.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NlmGracePeriodSec<UInt32>

Specifies a grace period, in seconds, that an NFS server enforces for the Network Lock Manager (NLM) protocol. The default value is 45.


Aliases

none

Required?

false

Position?

named

Default Value

45

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NlmProtocol<String[]>

Specifies one or more preferred underlying transport protocols that an NFS server uses for the NLM protocol. You must specify at least one of these two values: Tcp and Udp.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NsmProtocol<String[]>

Specifies one or more preferred underlying transport protocols that an NFS server uses for the Network Status Manager (NSM) protocol. You must specify at least one of these two values: Tcp and Udp.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-OnlineTimeoutSec<UInt32>

Specifies a time-out value, in seconds, for an NFS server. An NFS server waits for this length of time for a resource to come online before it processes an incoming request.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PortmapProtocol<String[]>

Specifies one or more preferred underlying transport protocols that an NFS server uses for the Portmap protocol. You must specify at least one of these two values: Tcp and Udp.


Aliases

none

Required?

false

Position?

named

Default Value

3

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PreserveInheritance<Boolean>

Specifies whether an NFS server creates inheritable access control entries (ACEs). These ACEs apply to newly created files and folders on NFS shares. The default value is $False for non-inheritable ACEs.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

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

-UnmappedUserAccount<String>

Specifies the Windows account that an NFS server uses to represent users who have no mapping configured in the mapping store. By default, an NFS server uses NT AUTHORITY\Anonymous.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WorldAccount<String>

Specifies the Windows account that an NFS server uses to represent World/Other permissions on files when it uses AUTH_UNIX security. By default, the NFS server uses the BUILTIN\Everyone account.


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.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.Management.Infrastructure.CimInstance#root/Microsoft/Windows/NFS/MSFT_NfsServerConfig

Examples

Example 1: Set a grace period on a local NFS server

This command sets the grace period for the NLM protocol to 45 seconds and sets the grace period for NFS v4.1 to 240 seconds on a local NFS server.


PS C:\> Set-NfsServerConfiguration -NlmGracePeriodSec 45 -GracePeriodSec 240

Example 2: Set NFS versions on a local NFS server

This command disables versions 2 and 3 of the NFS protocol and enables NFS v4.1 on a local NFS server.


PS C:\> Set-NfsServerConfiguration -EnableNfsv2 $false -EnableNfsv4 $true -EnableNfsv3 $true

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft