Smb2 windows 10 выключить

Server Message Block (SMB) protocol is a network file sharing protocol used in Windows operating system. Using the SMB protocol, an application can access files or other resources at a remote server. In this way, applications can read, create, and update files on the remote server. In Windows 10 Version 1709 or later, SMBv1 protocol is no longer installed by default. Due to security reasons, Microsoft no longer recommends using SMBv1. It is recommended that you use either SMBv2 or above. In this article, we’ll see how to enable/disable SMBv2 in Windows 10?

In case of SMBv1, it was quite easy to enable this protocol via ‘Turn Windows Features On or Off’. However the same is not applicable to SMBv2. You cannot enable or disable this protocol from ‘Turn Windows Features On or Off’. But there is nothing to worry about. You can also enable or disable SMB protocols using some other ways.  So here is how you can enable or disable SMBv2 in your Windows 10. Note that by default, SMBv2 is enabled on Windows 10.

Page Contents

How to enable/disable SMBv2 in Windows 10?

Method 1 – Using Windows PowerShell

Follow these steps to enable or disable SMBv2 using PowerShell.

1. Right click Start Button or press + X keys and select Windows PowerShell (Admin).

2. In administrative Windows PowerShell window, paste following and press Enter key:

Get-SmbServerConfiguration | Select EnableSMB2Protocol

How to enable/disable SMBv2 in Windows 10

If the response of above command is True, then SMBv2 protocol is enabled.

3. To disable SMBv2 protocol on your system, execute following command:

Set-SmbServerConfiguration -EnableSMB2Protocol $false

After this, you’ll need to press Y to confirm this operation. In few seconds, the SMBv2 protocol will be disabled. You can again check the status of protocol using cmdlet mentioned in step 2.

If later you need to enable SMBv2 protocol again, use this command and similarly confirm the operation by pressing Y key:

Set-SmbServerConfiguration -EnableSMB2Protocol $true

So this is how you can manage SMB protocol using PowerShell.

Method 2 – Using Registry

Registry Disclaimer: It is recommended to create a System Restore point first, if you’re not familiar with registry manipulation.

To enable or disable SMBv2 protocol via registry, follow these steps:

1. Run regedit command to open Registry Editor

2. In left pane of Registry Editor window, go to:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters

How to enable/disable SMBv2 in Windows 10

3. In right pane of Parameters, set the Value data of SMB2 registry DWORD to 0 to disable SMBv2 protocol. If you want to enable SMBv2 protocol, set its Value data to 1.

4. Close Registry Editor and reboot to make your changes effective.

Check out this video to see how to fix a common issue, when SMBv2 is disabled:

That’s it!

RELATED ARTICLES

Hello! Windows 10 is an operating system that integrates various protocols to ensure its use with internal and external processes. Indeed, one of these protocols is Server Message Block, better known as SMB. This is a mechanism that allows network file sharing. In addition, it is integrated by a set of message packages that allow us to define which version of the protocol is to be used. Therefore, it is possible to share files, printers, and data on a local network. SMB is available in versions SMB1 or SMB2. And each one has its own characteristics. Similarly, in Windows 10 Home and Windows 10 Professional editions, SMBv1 is already disabled. Consequently, only in these versions, only SMB2 is offered. So it’s important to know how to enable and disable SMB1/SMB2 in Windows 10.

Main advantages of SMB

This protocol also allows communication between Windows and Linux operating systems. On the other hand, it also has the following advantages:

  • Printing on a local network
  • Extended file attribute management
  • Unicode support
  • File, directory and shared access authentication

Benefits of SMB2

In addition to the features present in its predecessor, this protocol incorporates new functions:

  • Improvements in the use of the network
  • More complete readings and writings
  • MTU Support
  • Oplock customer lease model
  • Soporta versiones anteriores de SMB

How to turn SMB1 on or off in Windows 10 using PowerShell.

First, check if SMB1 is active. With this intention, it opens a PowerShell with administrator privileges. To do this, press the Win+x combination and select the app from the list.

Runs a PowerShell with administrative privileges

Then run this command:

Get-WindowsOptionalFeature –Online –FeatureName SMB1Protocol

To disable SMB1 please run the following:

Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol

To enable it, just execute the following command. Also, press Y to restart the computer and confirm the changes.

Enable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol

How to turn SMB2 on or off in Windows 10 using PowerShell.

As with SMB1, this time we will also use PowerShell with administrator privileges. First, check the service status with the following command:

Get-SmbServerConfiguration | Select EnableSMB2Protocol

To disable SMB2 please run:

Set-SmbServerConfiguration -EnableSMB2Protocol $false

Please note that you must confirm the operation:

To activate the protocol, please run it:

Set-SmbServerConfiguration -EnableSMB2Protocol $true

Once again, you must confirm the action:

Ultimately we’ve seen how to enable and disable SMB1/SMB2 in Windows 10. As you can see, it’s a simple process that involves easy handling of PowerShell. In addition, you can manage both protocols independently. Well, that’s it for now. Before I say goodbye, take a look at our ReactOS post. See you soon!

— Advertisement —

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.

Subscribe

«The best Linux newsletter on the web»

Сетевой протокол SMB (Server Message Block) используется для предоставления совместного удаленного доступа к файлам, принтерам и другим устройствам через порт TCP 445. В этой статье мы рассмотрим: какие версии (диалекты) протокола SMB доступны в различных версиях Windows (и как они соотносятся с версиями samba в Linux); как определить версию SMB на вашем компьютере; и как включить/отключить клиент и сервер SMBv1, SMBv2 и SMBv3.

Содержание:

  • Версии протокола SMB в Windows
  • Как проверить поддерживаемые версии SMB в Windows?
  • Вывести используемые версии SMB с помощью Get-SMBConnection
  • Об опасности использования SMBv1
  • Включение и отключение SMBv1, SMBv2 и SMBv3 в Windows

Версии протокола SMB в Windows

Есть несколько версии протокола SMB (диалектов), которые последовательно появлялись в новых версиях Windows:

Для реализации протокола SMB в Linux/Unix системах используется samba. В скобках мы указали в каких версиях samba поддерживается каждый диалект SMB.

  • CIFS — Windows NT 4.0;
  • SMB 1.0 — Windows 2000;
  • SMB 2.0 — Windows Server 2008 и Windows Vista SP1 (поддерживается в Samba 3.6);
  • SMB 2.1 — Windows Server 2008 R2 и Windows 7 (поддерживается в Samba 4.0);
  • SMB 3.0 — Windows Server 2012 и Windows 8 (поддерживается в Samba 4.2);
  • SMB 3.02 — Windows Server 2012 R2 и Windows 8. 1 (не поддерживается в Samba);
  • SMB 3.1.1 – Windows Server 2016 и Windows 10 (не поддерживается в Samba).

Начиная с версии Samba 4.14, по умолчанию используется SMB2.1.

При сетевом взаимодействии по протоколу SMB между клиентом и сервером используется максимальная версия протокола, поддерживаемая одновременно и клиентом, и сервером.

Ниже представлена сводная таблица, по которой можно определить версию протокола SMB, которая выбирается при взаимодействии разных версий Windows:

Операционная система Win 10, Server 2016 Windows 8.1,
Server 2012 R2
Windows 8,
Server 2012
Windows 7,
Server 2008 R2
Windows Vista,
Server 2008
Windows XP, Server 2003 и ниже
Windows 10 ,

Windows Server 2016

SMB 3.1.1 SMB 3.02 SMB 3.0 SMB 2.1 SMB 2.0 SMB 1.0
Windows 8.1 ,
Server 2012 R2
SMB 3.02 SMB 3.02 SMB 3.0 SMB 2.1 SMB 2.0 SMB 1.0
Windows 8 ,
Server 2012
SMB 3.0 SMB 3.0 SMB 3.0 SMB 2.1 SMB 2.0 SMB 1.0
Windows 7,
Server 2008 R2
SMB 2.1 SMB 2.1 SMB 2.1 SMB 2.1 SMB 2.0 SMB 1.0
Windows Vista,
Server 2008
SMB 2.0 SMB 2.0 SMB 2.0 SMB 2.0 SMB 2.0 SMB 1.0
Windows XP, 2003 и ниже SMB 1.0 SMB 1.0 SMB 1.0 SMB 1.0 SMB 1.0 SMB 1.0

К примеру, при подключении клиентского компьютера с Windows 8.1 к файловому серверу с Windows Server 2016 будет использоваться протокол SMB 3.0.2.

Согласно таблице Windows XP, Windows Server 2003 для доступа к общим файлам и папкам на сервере могут использовать только SMB 1.0, который в новых версиях Windows Server (2012 R2 / 2016) может быть отключен. Таким образом, если в вашей инфраструктуре одновременно используются компьютеры с Windows XP (снятой с поддержки), Windows Server 2003/R2 и сервера с Windows Server 2012 R2/2016/2019, устаревшие клиенты не смогут получить доступ к файлам и папкам на файловом сервере с новой ОС.

Если Windows Server 2016/2012 R2 с отключенным SMB v1.0 используется в качестве контроллера домена, значить клиенты на Windows XP/Server 2003 не смогут получить доступ к каталогам SYSVOL и NETLOGON на контроллерах домена и авторизоваться в AD.

На старых клиентах при попытке подключиться к ресурсу на файловом сервере с отключенным SMB v1 появляется ошибка:

The specified network name is no longer available

Как проверить поддерживаемые версии SMB в Windows?

Рассмотрим, как определить, какие версии протокола SMB поддерживаются на вашем компьютере Windows.

В Windows 10, 8.1 и Windows Server 2019/2016/2012R2 вы можете проверить состояние различных диалектов SMB протокола с помощью PowerShell:

Get-SmbServerConfiguration | select EnableSMB1Protocol,EnableSMB2Protocol

Get-SmbServerConfiguration | select EnableSMB1Protocol,EnableSMB2Protocol

Данная команда вернула, что протокол SMB1 отключен (
EnableSMB1Protocol=False
), а протоколы SMB2 и SMB3 включены (
EnableSMB1Protocol=True
).

Обратите внимание, что протоколы SMBv3 и SMBv2 тесно связаны между собой. Нельзя отключить или включить отдельно SMBv3 или SMBv2. Они всегда включаются/отключаются только совместно, т.к. используют один стек.

В Windows 7, Vista, Windows Server 2008 R2/2008:

Get-Item HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters | ForEach-Object {Get-ItemProperty $_.pspath}

Если в данной ветке реестра нет параметров с именами SMB1 или SMB2, значить протоколы SMB1 и SMB2 по умолчанию включены.

проверить какие версии smb включены в windows

Также в этих версиях Windows вы можете проверить, какие диалекты SMB разрешено использовать в качестве клиентов с помощью команд:

sc.exe query mrxsmb10

SERVICE_NAME: mrxsmb10
TYPE : 2 FILE_SYSTEM_DRIVER
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

sc.exe query mrxsmb20

SERVICE_NAME: mrxsmb20
TYPE : 2 FILE_SYSTEM_DRIVER
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

В обоих случаях службы запущены (
STATE=4 Running
). Значит Windows может подключаться как к SMBv1, так и к SMBv2 серверам.

Вывести используемые версии SMB с помощью Get-SMBConnection

Как мы говорили раньше, компьютеры при взаимодействии по протоколу SMB используют максимальную версию, поддерживаемую как клиентом, так и сервером. Для определения версии SMB, используемой для доступа к удаленному компьютеру можно использовать командлет PowerShell
Get-SMBConnection
:

Get-SMBConnection вывести в powershell версии smb, исопльзуемые для подключения

Версия SMB, используемая для подключения к удаленному серверу (ServerName) указана в столбце Dialect.

Можно вывести информацию о версиях SMB, используемых для доступа к конкретному серверу:

Get-SmbConnection -ServerName servername

Если нужно отобразить, используется ли SMB шифрование (появилось в SMB 3.0), выполните:

Get-SmbConnection | ft ServerName,ShareName,Dialect,Encrypted,UserName

В Linux вывести список SMB подключения и используемые диалекты в samba можно командой:

$ sudo smbstatus

Чтобы на стороне сервера вывести список используемых клиентами версий протокола SMB и количество клиентов, используемых ту или иную версию протокола SMB, выполните команду:

Get-SmbSession | Select-Object -ExpandProperty Dialect | Sort-Object -Unique

Get-SmbSession Получить количество клиентов, использующих разные версии SMB

В нашем примере имеется 825 клиентов, подключенных к серверу с помощью SMB 2.1 (Windows 7/Windows Server 2008 R2) и 12 клиентов SMB 3.02.

С помощью PowerShell можно включить аудит версий SMB, используемых для подключения:

Set-SmbServerConfiguration –AuditSmb1Access $true

События подключения затем можно извлечь из журналов Event Viewer с помощью PowerShell:

Get-WinEvent -LogName Microsoft-Windows-SMBServer/Audit

Об опасности использования SMBv1

Последние несколько лет Microsoft из соображений безопасности планомерно отключает устаревший протокол SMB 1.0. Связано это с большим количеством критических уязвимостей в этом протоколе (вспомните историю с эпидемиями вирусов-шифровальщиков wannacrypt и petya, которые использовали уязвимость именно в протоколе SMBv1). Microsoft и другие IT компании настоятельно рекомендуют отказаться от его использования.

Однако отключение SMBv1 может вызвать проблемы с доступом к общий файлам и папкам на новых версиях Windows 10 (Windows Server 2016/2019) с устаревших версий клиентов (Windows XP, Server 2003), сторонних ОС (Mac OSX 10.8 Mountain Lion, Snow Leopard, Mavericks, старые версии Linux), различных старых NAS устройствах.

Если в вашей сети не осталось legacy устройств с поддержкой только SMBv1, обязательно отключайте эту версию диалекта в Windows.

В том случае, если в вашей сети остались клиенты с Windows XP, Windows Server 2003 или другие устройства, которые поддерживают только SMBv1, их нужно как можно скорее обновить или тщательно изолировать.

Включение и отключение SMBv1, SMBv2 и SMBv3 в Windows

Рассмотрим способы включения, отключения различных версий SMB в Windows. Мы рассматриваем отдельно включение клиента и сервера SMB (это разные компоненты).

Windows 10, 8.1, Windows Server 2019/2016/2012R2:

Отключить клиент и сервер SMBv1:
Disable-WindowsOptionalFeature -Online -FeatureName smb1protocol

Отключить только SMBv1 сервер:
Set-SmbServerConfiguration -EnableSMB1Protocol $false

Включить клиент и сервер SMBv1:
Enable-WindowsOptionalFeature -Online -FeatureName smb1protocol

Включить только SMBv1 сервер:
Set-SmbServerConfiguration -EnableSMB1Protocol $true

Отключить сервер SMBv2 и SMBv3:
Set-SmbServerConfiguration -EnableSMB2Protocol $false

Включить сервер SMBv2 и SMBv3:
Set-SmbServerConfiguration -EnableSMB2Protocol $true

Set-SmbServerConfiguration - powershell отключить SMBv2 и SMBv3

Windows 7, Vista, Windows Server 2008 R2/2008:

Отключить SMBv1 сервер:

Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 0 –Force

отключить smbv1 сервер в windows 7 через powershell

Включить SMBv1 сервер:
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 1 –Force

Отключить SMBv1 клиент:

sc.exe config lanmanworkstation depend= bowser/mrxsmb20/nsi
sc.exe config mrxsmb10 start= disabled

Включить SMBv1 клиент:

sc.exe config lanmanworkstation depend= bowser/mrxsmb10/mrxsmb20/nsi
sc.exe config mrxsmb10 start= auto

Отключить SMBv2 сервер:

Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB2 -Type DWORD -Value 0 -Force

Включить SMBv2 сервер

Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB2 -Type DWORD -Value 1 –Force

Отключить SMBv2 клиент:

sc.exe config lanmanworkstation depend= bowser/mrxsmb10/nsi
sc.exe config mrxsmb20 start= disabled

Включить SMBv2 клиент:

sc.exe config lanmanworkstation depend= bowser/mrxsmb10/mrxsmb20/nsi
sc.exe config mrxsmb20 start= auto

Для отключения сервера SMBv1 на всех компьютерах независимо от версии Windows можно распространить параметр реестра типа REG_DWORD с именем SMB1 и значением 0 (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters)на через GPO.

Для отключения SMBv2 нужно в этой же ветке установить параметр SMB2=0.

Для отключения SMBv1 клиента нужно распространить такой параметр реестра:

  • Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\mrxsmb10
  • Name: Start
  • Type: REG_DWORD
  • Value: 4

При отключении SMB 1.0/CIFS File Sharing Support в Windows вы можете столкнуться с ошибкой “0x80070035, не найден сетевой путь”, ошибкой при доступе к общим папкам, и проблемами обнаружения компьютеров в сетевом окружении. В этом случае вместо служба обозревателя компьютеров (Computer Browser) нужно использовать службы обнаружения (линк).

By Timothy Tibbetts


If you need to disable or enable SMBv2 for troubleshooting purposes, it’s easy to do for any skill level. Here’s what to do.

Server Message Block (SMB) is a communication protocol for providing shared access to files, printers, and serial ports between nodes on a network and providing an authenticated inter-process communication (IPC) mechanism.

You might need to enable or disable SMB2, or you might be here to troubleshoot problems, including the common Your system requires SMB2 or higher errors.

To enable SMBv2, you want to confirm your operating system can run it. Most Windows 10 operating systems can.

Open the Powershell and type in Get-SmbServerConfiguration | Select EnableSMB2Protocol.

You should receive a True in response, meaning you can run SMB2 on your computer. If not, you might need to be sure you have the latest build of Windows.

To enable SMBv2 on your computer, type in:
Set-SmbServerConfiguration –EnableSMB2Protocol $true

To disable SMBv2 on your computer, type in:
Set-SmbServerConfiguration -EnableSMB2Protocol $false

SMBv2 should be disabled by default. If you don’t have a reason to enable SMBv2, don’t.

comments powered by Disqus

SMB2 and/or SMB3 protocols are enabled by default in Windows. If ever needed, here are the steps to disable SMB2 and SMB3 in Windows.

Recently, Microsoft has to issue an emergency patch to wormable vulnerability in the SMB3 protocol. Essentially, this vulnerability lets the attacker execute malicious code on the target machine and take control of it. Being a wormable vulnerability, it can spread to other systems on the local network. If you haven’t yet installed the KB4551762 update, I recommend you do so as soon as possible to avoid any unnecessary issues.

If you haven’t installed the update yet, you can try disabling SMB3 in Windows 10 as a precaution. Here’s how.

Things You Should Know Before Hand

As a general rule, you should not disable SMB2 or SMB3 protocols. However, if you are unable to install the security patch or to troubleshoot various issues, you can temporarily disable SMB3 or SMB2 protocol.

SMB3 protocol serves an important function in several different features in Windows 10, 8, and 7. For example, if you disable SMB3 in Windows 10, you might face problems with the following Windows functionality.

  • Folder and file properties caching
  • Durable handles
  • message signing
  • scalable file sharing
  • Symbolic links
  • Large MTU support
  • Transparent failover
  • Encryption
  • SMB direct
  • and more…

Simply put, only follow the below steps and disable SMB3 protocol if you know what you are doing and is absolutely necessary. If you are interested, here’s a great document from Microsoft on the overview of SMB3.

Steps to Disable SMB3 or SMB2 Protocol

Note: SMB2 and SMB3 are linked together. So, enabling or disabling SMB2 will do that same for SMB3.

To disable SMB 3, you can either use the PowerShell or Command Prompt. I will show both methods. Follow the one you are comfortable with.

via PowerShell (Recommended)

1. Open PowerShell as admin. You can do that by searching for “PowerShell” in the start menu and selecting the “Run as administrator” option from the right-click menu.

2. Next, verify that SMB3 is enabled by executing the below command. If the protocol is enabled, you should see “true” in the response.

Get-SmbServerConfiguration | Select EnableSMB2Protocol
Disable-smb3-smb2-get-current-state

3. To disable SMB3, execute this command.

Set-SmbServerConfiguration -EnableSMB2Protocol $false

4. PowerShell will ask for your confirmation, type “Y” or “A” and press Enter to confirm.

Disable-smb3-smb2-confirm

5. Once disabled, you can verify it by executing the first command. If the protocol is disabled, you should see “false“.

Disable-smb3-smb2-disabled

6. Finally, reboot Windows to apply the changes.

To re-enable SMB3, you can use the below command.

Set-SmbServerConfiguration -EnableSMB2Protocol $true

via Command Prompt

As an alternative, you can also use the Command Prompt to disable SMB3. The only problem is that it is not that intuitive as the PowerShell method. But, it works nonetheless.

1. Search for “cmd” in the start menu, right-click on “Command Prompt” result and select “Run as administrator“.

2. In the command prompt window, execute the below commands one of the other.

sc.exe config lanmanworkstation depend= bowser/mrxsmb10/nsi 

next

sc.exe config mrxsmb20 start= disabled

3. Once that is done, reboot Windows to apply changes. After rebooting, the SMB3 protocol will be disabled.

To enable the SMB3 protocol again, open Command Prompt as admin execute the below commands one after the other.

sc.exe config lanmanworkstation depend= bowser/mrxsmb10/mrxsmb20/nsi

next

sc.exe config mrxsmb20 start= auto

Wrapping Up

As you can see, it is pretty easy to disable SMB3 and SMB2 protocols in Windows 10. Like said before, don’t disable the SMB3 protocol permanently. Do this for troubleshooting purposes and only if you know what you are doing and understand the consequences.

I hope that helps. If you are stuck or need some help, comment below and I will try to help as much as possible.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Как открыть панель управления нвидиа на windows 11
  • Emachines e732g драйвера для windows 10
  • Windows cmd текущее время
  • Встроенная утилита для работы с дисками windows 10
  • Запуск скрипта python windows cmd