大网数据广告活动
磁盘与文件系统

Configure the SMB client to require encryption in Windows

· 52CE 我爱测

Learn how to configure SMB encryption mandate in Windows and Windows Server using Group Policy and PowerShell.

Beginning with Windows 11, version 24H2, and Windows Server 2025, the SMB client supports requiring encryption of all outbound SMB connections. Administrators can require all destination servers to support encryption with SMB 3.0 or later. In this article, learn how to configure the SMB client to require encryption for all outbound connections.

Encryption of all outbound SMB client connections enforces the highest level of network security and brings management parity to SMB signing, which allows both client and server requirements. When enabled, the SMB client won't connect to an SMB server that doesn't support SMB 3.0 or later, or that doesn't support SMB encryption. For example, a third-party SMB server might support SMB 3.0 but not SMB encryption.

SMB Encryption supplies SMB data end-to-end protection from interception attacks and snooping. The SMB client can require encryption per mapped drive, by UNC hardening, or on a per machine setting as described in this article. SMB server can also require SMB encryption on a per share basis or for the entire file server. To learn more about SMB encryption for SMB server and UNC Hardening, see SMB encryption.

Prerequisites

Before you can configure the SMB client to require encryption, you need:

  • An SMB client running on one of the following operating systems.
    • Windows 11, version 24H2, or later.
    • Windows Server 2025 or later.
  • Administrative privileges to the computer.
  • If you're using Group Policy on a domain, you need privileges to create or edit a Group Policy object (GPO) and link it to the appropriate organizational unit (OU).

Configure SMB encryption mandate using Group Policy

You can configure the SMB client to always require encryption regardless of server, share, UNC hardening, or mapped drive requirements. An administrator can globally force a Windows machine to use SMB encryption (and therefore SMB 3.x) on all connections, refusing to connect if the SMB server doesn't support either.

Tip: SMB encryption has associated performance and compatibility overhead. SMB signing features better performance and tamper protection but does not provide snooping protection. Forgoing encryption and signing completely offers the best performance but of course provides no security beyond connection authorization and pre-auth integrity protection. SMB encryption supersedes SMB signing and supplies the same level of tamper protection; if your SMB client requires signing, SMB encryption turns it off.

You can configure the SMB client to require encryption for outbound connections using Group Policy or PowerShell.

Group Policy

Here's how to configure the SMB client to require encryption for all outbound connections using Group Policy.

To configure SMB client for required encryption to all SMB servers (that is, for outbound connections):

  1. Open the Group Policy Management Console.
  2. Edit or create a Group Policy Object (GPO) that you want to use.
  3. In the console tree, select Computer Configuration > Administrative Templates > Network > Lanman Workstation.
  4. For the setting, right-click Require encryption and select Edit.
  5. Select Enable and select OK.

Setting the policy to disabled or not configured removes the encryption requirement.

Important: Be careful when deploying SMB encryption through organization-wide. Legacy SMB servers such as Windows Server 2008 R2 don't support SMB 3.0. Older third-party SMB servers in some cases can support SMB 3.0 but might not support encryption.

PowerShell

Here's how to configure the SMB client to require encryption for all outbound connections using the Set-SmbClientConfiguration PowerShell cmdlet.

From an elevated PowerShell prompt, set the following PowerShell parameter:

Set-SmbClientConfiguration -RequireEncryption $true

Run the following command to see the effective setting on a machine:

Get-SmbClientConfiguration | Format-List -Property RequireEncryption

Related content

Source: Microsoft Learn / Windows Server documentation by Microsoft and contributors (upstream author metadata: robinharwood). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Server documentation
适用范围
Windows Server · Source date 10/25/2024
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。