Set-NfsServerConfiguration

Set-NfsServerConfiguration

Changes configuration settings for an NFS server.

構文

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

詳細説明

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.

パラメーター

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

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-AsJob

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-AuthenticationRenewalIntervalSec<UInt32>

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

エイリアス

なし

必須?

false

位置は?

named

既定値

600

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CharacterTranslationFile<String>

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

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CimSession<CimSession[]>

リモート セッションまたはリモート コンピューターでコマンドレットを実行します。New-CimSession コマンドレットや Get-CimSession コマンドレットの出力など、コンピューター名またはセッション オブジェクトを入力します。既定値は、ローカル コンピューターで実行中の現在のセッションです。

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-ClearMappingCache

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

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-DirectoryCacheSize<UInt32>

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

エイリアス

なし

必須?

false

位置は?

named

既定値

128

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-EnableAuthenticationRenewal<Boolean>

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

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-EnableNFSV2<Boolean>

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

エイリアス

なし

必須?

false

位置は?

named

既定値

3

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-EnableNFSV3<Boolean>

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

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-EnableNFSV4<Boolean>

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

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-HideFilesBeginningInDot<Boolean>

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

エイリアス

なし

必須?

false

位置は?

named

既定値

0

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-InputObject<CimInstance[]>

このコマンドレットへの入力を指定します。このパラメーターを使用するか、パイプを使用して入力をこのコマンドレットに渡すことができます。

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

-LeasePeriodSec<UInt32>

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

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-LogActivity<String[]>

Specifies the activities that an NFS server logs for audit purposes. このパラメーターに対して使用できる値:

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

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

3

パイプライン入力を許可する

false

ワイルドカード文字を許可する

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

3

パイプライン入力を許可する

false

ワイルドカード文字を許可する

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

3

パイプライン入力を許可する

false

ワイルドカード文字を許可する

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

45

パイプライン入力を許可する

false

ワイルドカード文字を許可する

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-PassThru

作業中の項目を表すオブジェクトを返します。既定では、このコマンドレットによる出力はありません。

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

3

パイプライン入力を許可する

false

ワイルドカード文字を許可する

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-ThrottleLimit<Int32>

このコマンドレットを実行するために確立できる最大同時操作数を指定します。このパラメーターを省略するか、値として 0 を入力した場合、Windows PowerShell® では、コンピューターで実行している CIM コマンドレットの数に基づいて、コマンドレットに対する最適なスロットル制限を計算します。スロットル制限は現在のコマンドレットのみに適用され、セッションまたはコンピューターには適用されません。

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Confirm

コマンドレットを実行する前に、ユーザーに確認を求めます。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-WhatIf

コマンドレットを実行するとどのような結果になるかを表示します。コマンドレットは実行されません。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

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

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

関連トピック

Get-NfsServerConfiguration