如果您想在 Windows 11/10 设备上启用或禁用SMBv2,那么本指南将帮助您执行此操作。不过在此之前,先简单介绍一下这款应用,不过,如果您已经熟悉这款应用,可以直接进入下面的部分,按照步骤进行操作。
SMB(服务器消息块(Server Message Block))是一种网络文件共享协议,实际上是为跨计算机设备(如文件、打印机等)共享数据而设计的。在SMB客户端和计算机网络中, (SMB)Windows 10目前支持三个版本。它们是SMB版本 1 ( SMBv1 )、SMB版本 2 ( SMBv2 ) 和SMB版本 3 ( SMBv3 )——其中SMBv1是SMB的原始实现。但是,SMB2是旧服务器消息块的新版本(Server Message Block)通信协议,这个更安全。最新版本的SMBv3
如何在Windows 11/10SMBv2
要在Windows 11/10中启用或禁用SMBv2,请遵循以下建议。如果您要在您的计算机上启用SMBv2文件传输协议,您首先需要检查您的系统是否可以安装它。
为此,请使用Windows+X键盘快捷键打开高级用户菜单(Power User Menu)
从菜单列表中选择Windows PowerShell ( Admin )。
如果UAC提示要求您批准,请单击是,PowerShell 提示将打开。
在下一个屏幕上,键入以下命令并按 Enter:
Get-SmbServerConfiguration | Select EnableSMB2Protocol
如果上述命令运行成功,则表示您的计算机可以安装SMB2。所以继续它,现在您可以通过运行一个简单的命令来启用此功能。
为此,请键入以下命令并按Enter启用它:
Set-SmbServerConfiguration -EnableSMB2Protocol $true
现在将要求您确认是否真的要执行此操作。因此,按Y并按Enter。这将在您的计算机上启用SMB2协议。
阅读(Read): 如何在 Windows 上检查 SMB 版本。
如果您的系统上已经启用了SMB2协议,而现在您想要禁用它,那么您只需要在提升的PowerShell窗口中运行以下命令:
Set-SmbServerConfiguration -EnableSMB2Protocol $false
成功运行上述命令后,按Y并按 Enter。
执行上述过程后,现在SMB2协议已在您的计算机上禁用。
在Windows 11/10中禁用SMBv2或SMBv3以进行故障排除(SMBv3)
如果SMBv2和SMBv3协议都已启用,那么将任何人禁用一段时间将有助于故障排除。但是,禁用这些协议也会产生一些后果。它可以停用以下功能:
- 透明故障转移(Transparent Failover)——客户端在维护或故障转移期间重新连接而不中断集群节点
- Scale Out – 并发访问所有文件集群节点上的共享数据
- 多通道(Multichannel)——如果客户端和服务器之间有多个可用路径,则聚合网络带宽和容错
- SMB Direct – 添加RDMA网络支持以实现非常高的性能、低延迟和低CPU利用率
- 加密(Encryption)——提供(Provides)端到端加密并防止对不可信网络的窃听
- 目录租赁(Directory Leasing)——通过缓存提高分支机构的应用程序响应时间
- 性能优化(Performance Optimizations)——针对小型随机读/写 I/O 的优化。
相关:(Related:) 如何在 Windows 上禁用 SMB1
How to enable or disable SMBv2 in Windows v
If you want to еnable or disable SMBv2 on your Windows 11/10 device then this guide will help you do so. But before that, let’s know a brief introduction about this application, however, if you are already familiar with this application, you can directly go to the below section and use the steps to proceed.
SMB (Server Message Block) is a network file sharing protocol that is actually designed for data sharing across computer devices like files, printers, and more. On the SMB client and in computer networking, there are currently three versions that are supported by Windows 10. These are SMB version 1 (SMBv1), SMB version 2 (SMBv2), and SMB version 3 (SMBv3) – in which SMBv1 is the original implementation of SMB. However, SMB2 is a new version of the old Server Message Block communication protocol and this one is more secure. The latest version of the SMBv3
How to enable or disable SMBv2 in Windows 11/10
To enable or disable SMBv2 in Windows 11/10, follow the below suggestions. If you’re going to enable the SMBv2 file transfer protocol on your computer, you first need to check whether your system can install it or not.
To do so, open the Power User Menu using the Windows+X keyboard shortcut
Select Windows PowerShell (Admin) from the menu list.
If the UAC prompt asks you for your approval, click yes and the PowerShell prompt will open.
On the next screen, type the following command and press Enter:
Get-SmbServerConfiguration | Select EnableSMB2Protocol
If the above command runs successfully, it means your computer is able to install SMB2. So proceeding with it, now you can enable this feature by running a simple command.
To do this, type the following command and press Enter to enable it:
Set-SmbServerConfiguration -EnableSMB2Protocol $true
Now you will be asked to confirm whether you really want to perform this action. So, press Y and hit Enter. And this will enable the SMB2 protocol on your computer.
Read: How to check SMB version on Windows.
In case the SMB2 protocol is already enabled on your system and now you want to disable it then all you need to run the following command in the elevated PowerShell window:
Set-SmbServerConfiguration -EnableSMB2Protocol $false
Once you run the above command successfully, press Y and hit Enter.
After performing the above process, now SMB2 protocol is disabled on your computer.
Disable SMBv2 or SMBv3 for troubleshooting in Windows 11/10
If both SMBv2 and SMBv3 protocols are already enabled, then it would be helpful for troubleshooting if you disable anyone for a while. However, there are also some consequences of disabling these protocols. It can deactivate the following functionality:
- Transparent Failover – clients reconnect without interruption to cluster nodes during maintenance or failover
- Scale Out – concurrent access to shared data on all file cluster nodes
- Multichannel – aggregation of network bandwidth and fault tolerance if multiple paths are available between client and server
- SMB Direct – adds RDMA networking support for very high performance, with low latency and low CPU utilization
- Encryption – Provides end-to-end encryption and protects from eavesdropping on untrustworthy networks
- Directory Leasing – Improves application response times in branch offices through caching
- Performance Optimizations – optimizations for small random read/write I/O.
Related: How to disable SMB1 on Windows