How to Check, Enable or Disable SMB Protocol Versions on Windows? | Windows OS Hub (2024)

The Server Message Block (SMB) network protocol is used to share and access folders, files, printers, and other devices over network (TCP port 445). In this article, we will look at which versions (dialects) of SMB are available in different versions of Windows (and how they relate to samba versions on Linux); how to check the SMB version in use on your computer; and how to enable or disable the SMBv1, SMBv2, and SMBv3 dialects.

Contents:

  • SMB Protocol Versions in Windows
  • How to Check SMB Version on Windows?
  • Checking Used SMB Dialects with Get-SMBConnection
  • Stop Using the Insecure SMBv1 Protocol
  • How to Enable and Disable SMBv1, SMBv2, and SMBv3 on Windows?

SMB Protocol Versions in Windows

There are several versions of the SMB protocol (dialects) that have consistently appeared in new Windows versions (and samba) :

  • CIFS – Windows NT 4.0
  • SMB 1.0 – Windows 2000
  • SMB 2.0 – Windows Server 2008 and Windows Vista SP1 (supported in Samba 3.6)
  • SMB 2.1 – Windows Server 2008 R2 and Windows 7 (Samba 4.0)
  • SMB 3.0 – Windows Server 2012 and Windows 8 (Samba 4.2)
  • SMB 3.02 – Windows Server 2012 R2 and Windows 8.1 (not supported in Samba)
  • SMB 3.1.1 – Windows Server 2016 and Windows 10 (not supported in Samba)

Samba is used to implement the SMB protocol in Linux/Unix . Samba 4.14 and newer uses SMB 2.1 by default.

In SMB network communication, the client and server use the maximum SMB protocol version supported by both the client and the server.

The summary table of SMB version compatibility looks like this. Using this table, you can determine the version of the SMB protocol that is selected when different versions of Windows interact:

Operating SystemWindows 10, Win Server 2016Windows 8.1, Win Server 2012 R2Windows 8,Server 2012Windows 7,Server 2008 R2Windows Vista,Server 2008Windows XP, Server 2003 and earlier
Windows 10, Windows Server 2016SMB 3.1.1SMB 3.02SMB 3.0SMB 2.1SMB 2.0SMB 1.0
Windows 8.1, Server 2012 R2SMB 3.02SMB 3.02SMB 3.0SMB 2.1SMB 2.0SMB 1.0
Windows 8, Server 2012SMB 3.0SMB 3.0SMB 3.0SMB 2.1SMB 2.0SMB 1.0
Windows 7, Server 2008 R2SMB 2.1SMB 2.1SMB 2.1SMB 2.1SMB 2.0SMB 1.0
Windows Vista, Server 2008SMB 2.0SMB 2.0SMB 2.0SMB 2.0SMB 2.0SMB 1.0
Windows XP, 2003 and earlierSMB 1.0SMB 1.0SMB 1.0SMB 1.0SMB 1.0SMB 1.0

For example, if a client computer running Windows 8.1 connects to a file server with Windows Server 2016, the SMB 3.0.2 protocol will be used.

According to the table, Windows XP and Windows Server 2003 can use only SMB 1.0 to access shared folders and files. The SMBv1 is disabled in newer versions of Windows Server (2012 R2/2016). So, if you are still using Windows XP and Windows Server 2003 devices on your network, they won’t be able to access shared folders on the file server running Windows Server 2016.

If Windows Server 2019/2016 with disabled SMB v1.0 is used as a domain controller, then Windows XP/Server 2003 clients won’t be able to access the SYSVOL and NETLOGON folders on domain controllers and authenticate with AD.

You may receive the following error when trying to connect to a shared folder on a file server with SMBv1 disabled:

The specified network name is no longer available

How to Check SMB Version on Windows?

Let’s look on how to find out which versions of the SMB are enabled on your Windows device.

On Windows 10/8.1 and Windows Server 2019/2016/2012R2, you can check the status of various dialects of the SMB protocol using PowerShell:

Get-SmbServerConfiguration | select EnableSMB1Protocol,EnableSMB2Protocol

How to Check, Enable or Disable SMB Protocol Versions on Windows? | Windows OS Hub (1)

This command returned that the SMB1 protocol is disabled (EnableSMB1Protocol = True), and the SMB2 and SMB3 protocols are enabled (EnableSMB1Protocol = False).

Note that the SMBv3 and SMBv2 protocols are closely related. You cannot disable or enable SMBv3 or SMBv2 separately. They are always enabled/disabled only together because they share the same stack.

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

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

If there are no parameters named SMB1 or SMB2 in this registry key, then the SMBv1 and SMBv2 protocols are enabled by default.

How to Check, Enable or Disable SMB Protocol Versions on Windows? | Windows OS Hub (2)

Also on these Windows versions, you can check which SMB client dialects are allowed to connect to remote hosts:

sc.exe query mrxsmb10

SERVICE_NAME: mrxsmb10TYPE : 2 FILE_SYSTEM_DRIVERSTATE : 4 RUNNING(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)WIN32_EXIT_CODE : 0 (0x0)SERVICE_EXIT_CODE : 0 (0x0)CHECKPOINT : 0x0WAIT_HINT : 0x0

sc.exe query mrxsmb20

SERVICE_NAME: mrxsmb20TYPE : 2 FILE_SYSTEM_DRIVERSTATE : 4 RUNNING(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)WIN32_EXIT_CODE : 0 (0x0)SERVICE_EXIT_CODE : 0 (0x0)CHECKPOINT : 0x0WAIT_HINT : 0x0

In both cases, the services are running (STATE = 4 Running). This means that the current Windows device can connect to both SMBv1 and SMBv2 hosts.

Checking Used SMB Dialects with Get-SMBConnection

When communicating over SMB, computers use the maximum SMB version supported by both the client and the server. The Get-SMBConnection PowerShell cmdlet can be used to check the SMB version used to access a remote computer:

How to Check, Enable or Disable SMB Protocol Versions on Windows? | Windows OS Hub (3)

The SMB version used to connect to the remote server (ServerName) is listed in the Dialect column.

You can display information about the SMB versions used to access a specific server:

Get-SmbConnection -ServerName srvfs01

If you want to display if SMB encryption is in use (introduced in SMB 3.0):

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

On Linux, you can display a list of SMB connections and used dialects in samba using the command:

$ sudo smbstatus

On the Windows SMB server side, you can display a list of the versions of the SMB protocols that the clients are currently using. Run the command:

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

In this example, there are 898 clients connected to the server using SMB 2.1 (Windows 7/ Windows 2008 R2) and 8 SMB 3.02 clients.

You can use PowerShell to enable auditing of the SMB versions used for the connection:

Set-SmbServerConfiguration –AuditSmb1Access $true

SMB connection events can then be exported from Event Viewer logs:

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

Stop Using the Insecure SMBv1 Protocol

Over the past few years, Microsoft has systematically disabled the legacy SMB 1.0 protocol in all products for security reasons. This is due to the large number of critical vulnerabilities in this protocol (remember the incidents with wannacrypt and petya ransomware, which exploited a vulnerability in the SMBv1 protocol). Microsoft and other IT companies strongly recommend that you stop using SMBv1 in your network.

However, disabling SMBv1 can cause problems with accessing shared files and folders on newer versions of Windows 10 (Windows Server 2016/2019) from legacy clients (Windows XP, Windows Server 2003), third-party OS (Mac OSX 10.8 Mountain Lion, Snow Leopard, Mavericks, old Linux distros), old NAS devices.

If there are no legacy devices left on your network that support only SMBv1, be sure to disable this SMB dialect in Windows.

If you have clients running Windows XP, Windows Server 2003, or other devices that only support SMBv1, they should be updated or isolated.

How to Enable and Disable SMBv1, SMBv2, and SMBv3 on Windows?

Let’s look at ways to enable and disable different SMB versions on Windows. We’ll cover SMB client and server management (they are different Windows components).

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

Disable SMBv1 client and server:

Disable-WindowsOptionalFeature -Online -FeatureName smb1protocol

Disable SMBv1 server only:

Set-SmbServerConfiguration -EnableSMB1Protocol $false

Enable SMBv1 client and server:

Enable-WindowsOptionalFeature -Online -FeatureName smb1protocol

Enable only SMBv1 server:

Set-SmbServerConfiguration -EnableSMB1Protocol $true

Learn more about the SMBv1 protocol on Windows 10 and Windows Server 2016/2019.

Disable SMBv2 and SMBv3 server:

Set-SmbServerConfiguration -EnableSMB2Protocol $false

Enable SMBv2 and SMBv3 server:

Set-SmbServerConfiguration -EnableSMB2Protocol $true

How to Check, Enable or Disable SMB Protocol Versions on Windows? | Windows OS Hub (5)

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

Disable SMBv1 server:

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

How to Check, Enable or Disable SMB Protocol Versions on Windows? | Windows OS Hub (6)

Enable SMBv1 server:

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

Disable SMBv1 client:

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

Enable SMBv1 client:

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

Disable SMBv2 server:

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

Enable SMBv2 server:

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

Disable SMBv2 client:

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

Enable SMBv2 client:

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

You can disable SMBv1 server on domain joined computers by deploying the following registry parameter through the GPO:

  • Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
  • Name: SMB1
  • Type: REG_DWORD
  • Value: 0

Set the registry parameter SMB2=0 in order to disable the SMBv2 server.

To disable the SMBv1 client, you need to propagate the following registry setting:

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

When disabling SMB 1.0/CIFS File Sharing Support on Windows, you may encounter the error 0x80070035 network path not found, get an error when accessing shared SMB folders, and issues with network discovery. In this case, you must use the Discovery Service instead of the Computer Browser service (link).

How to Check, Enable or Disable SMB Protocol Versions on Windows? | Windows OS Hub (2024)

FAQs

How do I know if SMB protocol is enabled? ›

Check SMB status: Check the status of the SMB service by running the command "Get-Service -Name "LanmanServer"" in PowerShell. This command will display the status of the LanmanServer service, which is responsible for the SMB protocol.

How do I disable SMB protocol in Windows? ›

Step 1: Open control panel Step 2: Navigate to programs and features. Step 3: Click on "Turn Windows features on or off. Step 4: Disable "(Server Message Block) SMB v1"Step 5 : Click ok.

How to find SMB version in Windows? ›

Let's look on how to find out which versions of the SMB are enabled on your Windows device. This command returned that the SMB1 protocol is disabled ( EnableSMB1Protocol = True ), and the SMB2 and SMB3 protocols are enabled ( EnableSMB1Protocol = False ). Note that the SMBv3 and SMBv2 protocols are closely related.

How to detect enable and disable SMBv1? ›

SMBv1
  1. Detect: PowerShell Copy. Get-SmbServerConfiguration | Select EnableSMB1Protocol.
  2. Disable: PowerShell Copy. Set-SmbServerConfiguration -EnableSMB1Protocol $false.
  3. Enable: PowerShell Copy. Set-SmbServerConfiguration -EnableSMB1Protocol $true.
May 18, 2023

How to enable SMB in Windows? ›

Enabling SMB Signing via Group Policy

Within the policy navigate to Computer Configuration > Policies > Windows Settings > Security Settings > Local Policies > Security Options. There are 4 policy items that can be modified depending on your needs. All of these policy items can either be enabled or disabled.

How to disable SMB protocol in Windows 10? ›

Open Control Panel, go to Programs, from Programs and features open Turn Windows features on or off, locate the SMV V1. 0, unmark and reboot the system. Open Regedit, HKEY_LOCAL_MACHINE, SYSTEM,CurrentControlSet,Services,LanmanServer, Paramemeters.

How do I fix SMB protocol in Windows 10? ›

To enable SMB v1 in Windows 10 or 11, open the Start Menu or the search menu, then type “windows features” and choose Turn Windows features on or off. If neither of these solutions work, as a last-ditch option, you can turn SMB v1 support back on—but you'll also introduce your PC to notable security risks.

How do I change the SMB protocol in Windows 10? ›

Adjust SMB1 support via the Windows 10 Control Panel
  1. Step 1: Open “Programs and Features” ...
  2. Step 2: Open menu for Windows features. ...
  3. Step 3: Disable support for SMB 1.0/CFIS file sharing. ...
  4. Step 4: Confirm changes and restart device.
Sep 15, 2020

How to enable SMB2.0 on Windows 10? ›

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.

What is the latest version of SMB? ›

SMB 3.1. 1 is the latest version. SMB 3 is built in for Windows 8, 10, and 11 as well as Windows Server 2012, 2016, and 2022. Other devices may also share files using SMB 3, such as network-attached storage (NAS) devices, printer/scanners or macOS clients.

What is the SMB version? ›

The Server Message Block (SMB) protocol is a network file sharing protocol that allows applications on a computer to read and write to files and to request services from server programs in a computer network.

Is SMB disabled by default? ›

Summary: SMB1 is considered a deprecated and non-secured protocol. For that reason, by design, it is blocked by default due to the security reasons and can be re-enabled by customer if needed. This article may have been automatically translated.

How do I check SMB1 in Windows 10? ›

STEP 1 :Access Control Panel. Then, select Programs. STEP 2 : Locate Programs and Features and click Turn Windows features on or off. STEP 3 : Find SMB 1.0/CIFS File Sharing Support in the list and enable all three functions belong to it.

Is SMB v1 disabled in Windows 10? ›

Since Windows 10 Fall Creators Update and Windows Server, version 1709 (RS3), the Server Message Block version 1 (SMBv1) network protocol is no longer installed by default. It was superseded by SMBv2 and later protocols starting in 2007. Microsoft publicly deprecated the SMBv1 protocol in 2014.

How do I turn on SMB? ›

To enable SMB v1 in Windows 10 or 11, open the Start Menu or the search menu, then type “windows features” and choose Turn Windows features on or off. If neither of these solutions work, as a last-ditch option, you can turn SMB v1 support back on—but you'll also introduce your PC to notable security risks.

What happens if SMB is disabled? ›

SMB2 is still fine and if disabled may cause some scanners to stop scan to folder and other options (and other devices might stop working as well as most have only just stopped using SMB1). Disable SMB1 first and check the effects. Some equipment such as printers may only work with SMB1 and are not upgradeable.

How do I connect to SMB protocol? ›

How to access SMB share from windows over the internet with specific port number
  1. go to My computer.
  2. Click add network location.
  3. Enter x.x.x.x as ip (ofcourse I enter a real public IP)
  4. Then try to connect.
Dec 23, 2020

Top Articles
Latest Posts
Article information

Author: Arielle Torp

Last Updated:

Views: 6256

Rating: 4 / 5 (61 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Arielle Torp

Birthday: 1997-09-20

Address: 87313 Erdman Vista, North Dustinborough, WA 37563

Phone: +97216742823598

Job: Central Technology Officer

Hobby: Taekwondo, Macrame, Foreign language learning, Kite flying, Cooking, Skiing, Computer programming

Introduction: My name is Arielle Torp, I am a comfortable, kind, zealous, lovely, jolly, colorful, adventurous person who loves writing and wants to share my knowledge and understanding with you.