Edit

Share via


Set-SmbClientConfiguration

Sets the SMB client configuration.

Syntax

Default (Default)

Set-SmbClientConfiguration
    [-CompressibilitySamplingSize <UInt64>]
    [-CompressibleThreshold <UInt64>]
    [-ConnectionCountPerRssNetworkInterface <UInt32>]
    [-DirectoryCacheEntriesMax <UInt32>]
    [-DirectoryCacheEntrySizeMax <UInt32>]
    [-DirectoryCacheLifetime <UInt32>]
    [-DisableCompression <Boolean>]
    [-DormantFileLimit <UInt32>]
    [-EnableBandwidthThrottling <Boolean>]
    [-EnableByteRangeLockingOnReadOnlyFiles <Boolean>]
    [-EnableCompressibilitySampling <Boolean>]
    [-EnableInsecureGuestLogons <Boolean>]
    [-EnableLargeMtu <Boolean>]
    [-EnableLoadBalanceScaleOut <Boolean>]
    [-EnableMultiChannel <Boolean>]
    [-EnableSecuritySignature <Boolean>]
    [-EncryptionCiphers <String>]
    [-ExtendedSessionTimeout <UInt32>]
    [-FileInfoCacheEntriesMax <UInt32>]
    [-FileInfoCacheLifetime <UInt32>]
    [-FileNotFoundCacheEntriesMax <UInt32>]
    [-FileNotFoundCacheLifetime <UInt32>]
    [-ForceSMBEncryptionOverQuic <Boolean>]
    [-KeepConn <UInt32>]
    [-MaxCmds <UInt32>]
    [-MaximumConnectionCountPerServer <UInt32>]
    [-OplocksDisabled <Boolean>]
    [-RequestCompression <Boolean>]
    [-RequireSecuritySignature <Boolean>]
    [-SessionTimeout <UInt32>]
    [-SkipCertificateCheck <Boolean>]
    [-UseOpportunisticLocking <Boolean>]
    [-WindowSizeThreshold <UInt32>]
    [-Force]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Set-SmbClientConfiguration cmdlet sets the Server Message Block (SMB) client configuration.

Note

  • The EncryptionCiphers parameter is available beginning with 2022-06 Cumulative Update for Microsoft server operating system version 21H2 for x64-based Systems (KB5014665), and Cumulative Update for Windows 11, version 22H2 (KB5014668).

  • The CompressibilitySamplingSize, CompressibleThreshold, EnableCompressibilitySampling, and RequestCompression parameters are available beginning with 2022-08 Cumulative Update for Microsoft server operating system version 21H2 for x64-based Systems (KB5016693), and Cumulative Update for Windows 11, version 22H2 (KB5016691).

Examples

Example 1: Set the SMB client configuration

Set-SmbClientConfiguration -ConnectionCountPerRssNetworkInterface 8 -Confirm:$false

This command sets the SMB client configuration without user confirmation.

Example 2: Specify encryption ciphers

Set-SmbClientConfiguration -EncryptionCiphers "AES_128_GCM, AES_256_GCM" -Confirm:$false

This command specifies the encryption ciphers used by the SMB client, and the preferred order without user confirmation.

Parameters

-AsJob

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

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

Parameter properties

Type:

CimSession[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:Session

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CompressibilitySamplingSize

Specifies the size in bytes to sample in a file to look for compressible data. Although the parameter type is UInt64, the sampling size can be specified up to a maximum of 9,007,199,254,740,992 (9 PiB).

Parameter properties

Type:UInt64
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CompressibleThreshold

Specifies the threshold in bytes in which to attempt to find compressible data. Although the parameter type is UInt64, the threshold can be specified up to a maximum of 9,007,199,254,740,992 (9 PiB).

Parameter properties

Type:UInt64
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ConnectionCountPerRssNetworkInterface

Specifies the SMB connection count per each RSS network interface.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DirectoryCacheEntriesMax

Specifies the maximum cache entries that can be in the directory cache.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DirectoryCacheEntrySizeMax

Specifies the maximum size of directory cache entry.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DirectoryCacheLifetime

Specifies the directory cache lifetime.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DisableCompression

Specifies that the SMB client ignores all requests for compression from applications or SMB servers.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DormantFileLimit

Specifies the dormant file limit.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EnableBandwidthThrottling

Indicates that bandwidth throttling is enabled.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EnableByteRangeLockingOnReadOnlyFiles

Indicates that byte range locking on read-only files is enabled.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EnableCompressibilitySampling

Controls the sampling behavior. SMB by default always attempts to compress the entire file when a client or server requests it. With EnableCompressibilitySampling set to $true, SMB uses the compression sampling algorithm where it attempts to compress the file based on the values configured in the CompressibiltySamplingSize and CompressibleThreshold parameters.

When you specify EnableCompressibilitySampling as $true and don't specify either the CompressibiltySamplingSize or CompressibleThreshold parameters, the algorithm attempts to compress the first 524,288,000 bytes (500 MiB) of a file during transfer. The algorithm tries to track that at least 104,857,600 bytes (100 MiB) compresses within that 500 MiB range. If fewer than 100 MiB was compressible, SMB compression stops trying to compress the rest of the file. If at least 100 MiB compressed, SMB compression attempts to compress the rest of the file.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EnableInsecureGuestLogons

Indicates whether SMB client will allow insecure guest logons to an SMB server.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EnableLargeMtu

Indicates that large MTU is enabled.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EnableLoadBalanceScaleOut

Indicates whether load balance scale out is enabled.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EnableMultiChannel

Indicates that multi-channel is enabled.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EnableSecuritySignature

Indicates that the security signature is enabled.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EncryptionCiphers

Specifies the encryption ciphers used by the SMB client and the preferred order.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExtendedSessionTimeout

Specifies the extended session time-out.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FileInfoCacheEntriesMax

Specifies the maximum number entries that can be in the file information cache.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FileInfoCacheLifetime

Specifies the file information cache lifetime.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FileNotFoundCacheEntriesMax

Specifies the maximum number entries that can be in the file not found cache.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FileNotFoundCacheLifetime

Specifies the file not found cache lifetime.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Force

Forces the command to run without asking for user confirmation.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ForceSMBEncryptionOverQuic

Specifies that the SMB client uses SMB encryption inside of the SMB over QUIC TLS 1.3 encrypted tunnel even if the SMB server doesn't require it.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-KeepConn

Specifies the time, in seconds, before the SMB client session is automatically disconnected.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MaxCmds

Specifies the maximum number of concurrent outstanding network requests that the SMB client supports.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MaximumConnectionCountPerServer

Specifies the maximum connection count per server.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-OplocksDisabled

Indicates that opportunistic locks are disabled.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RequestCompression

Indicates if an SMB client should always request compression even if the server or application didn't specify it.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RequireSecuritySignature

Indicates that the security signature is required.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SessionTimeout

Specifies the session time-out.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SkipCertificateCheck

Specifies that the SMB client not trust the SMB over QUIC SMB server certificate issuer. Required when using a self-signed certificate.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ThrottleLimit

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.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UseOpportunisticLocking

Indicates that opportunistic locks are used.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet isn't run.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WindowSizeThreshold

Specifies the window size threshold.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

Outputs

None