How to detect, enable and disable SMBv1, SMBv2, and SMBv3 in Windows (2023)

  • Article
  • 9 minutes to read

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows 11, Windows 10, Windows 8.1, Windows 8

This article describes how to enable and disable Server Message Block (SMB) version 1 (SMBv1), SMB version 2 (SMBv2), and SMB version 3 (SMBv3) on the SMB client and server components.

While disabling or removing SMBv1 might cause some compatibility issues with old computers or software, SMBv1 has significant security vulnerabilities, and we strongly encourage you not to use it.

Disabling SMBv2 or SMBv3 for troubleshooting

We recommend keeping SMBv2 and SMBv3 enabled, but you might find it useful to disable one temporarily for troubleshooting. For more information, see How to detect status, enable, and disable SMB protocols on the SMB Server.

In Windows 10, Windows 8.1, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, and Windows Server 2012, disabling SMBv3 deactivatesthe 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 high performance, with low latency and low CPU use
  • 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

In Windows 7 and Windows Server 2008 R2, disabling SMBv2deactivates the following functionality:

  • Request compounding - allows for sending multiple SMBv2 requests as a single network request
  • Larger reads and writes - better use of faster networks
  • Caching of folder and file properties - clients keep local copies of folders and files
  • Durable handles - allow for connection to transparently reconnect to the server if there's a temporary disconnection
  • Improved message signing - HMAC SHA-256 replaces MD5 as hashing algorithm
  • Improved scalability for file sharing - number of users, shares, and open files per server greatly increased
  • Support for symbolic links
  • Client oplock leasing model - limits the data transferred between the client and server, improving performance on high-latency networks and increasing SMB server scalability
  • Large MTU support - for full use of 10 Gigabit Ethernet (GbE)
  • Improved energy efficiency - clients that have open files to a server can sleep

The SMBv2 protocol was introduced in Windows Vista and Windows Server 2008, while the SMBv3 protocol was introduced in Windows 8 and Windows Server 2012. For more information about SMBv2 and SMBv3 capabilities, see the following articles:

  • Server Message Block overview
  • What's New in SMB

How to remove SMBv1 via PowerShell

Here are the steps to detect, disable and enable SMBv1 client and server by using PowerShell commands with elevation.

Note

The computer will restart after you run the PowerShell commands to disable or enable SMBv1.

  • Detect:

    Get-WindowsOptionalFeature -Online -FeatureName SMB1Protocol
  • Disable:

    Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol
  • Enable:

    Enable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol

Tip

You can detect SMBv1 status, without elevation, by running: Get-SmbServerConfiguration | Format-List EnableSMB1Protocol.

Windows Server 2012 Windows Server 2012 R2, Windows Server 2016, Windows Server 2019: Server Manager method

How to detect, enable and disable SMBv1, SMBv2, and SMBv3 in Windows (1)

To remove SMBv1 from Windows Server:

  1. On the Server Manager Dashboard of the server where you want to remove SMBv1, under Configure this local server, select Add roles and features.
  2. On the Before you begin page, select Start the Remove Roles and Features Wizard, and then on the following page, select Next.
  3. On the Select destination server page under Server Pool, ensure that the server you want to remove the feature from is selected, and then select Next.
  4. On the Remove server roles page, select Next.
  5. On the Remove features page, clear the check box for SMB 1.0/CIFS File Sharing Support and select Next.
  6. On the Confirm removal selections page, confirm that the feature is listed, and then select Remove.

Windows 8.1, Windows 10, and Windows 11: Add or Remove Programs method

How to detect, enable and disable SMBv1, SMBv2, and SMBv3 in Windows (2)

To disable SMBv1 for the mentioned operating systems:

  1. In Control Panel, select Programs and Features.
  2. Under Control Panel Home, select Turn Windows features on or off to open the Windows Features box.
  3. In the Windows Features box, scroll down the list, clear the check box for SMB 1.0/CIFS File Sharing Support and select OK.
  4. After Windows applies the change, on the confirmation page, select Restart now.

How to detect status, enable, and disable SMB protocols

Note

When you enable or disable SMBv2 in Windows 8 or Windows Server 2012, SMBv3 is also enabled or disabled. This behavior occurs because these protocols share the same stack.

  • Server
  • Client

Windows 8 and Windows Server 2012 introduced the new Set-SMBServerConfiguration Windows PowerShell cmdlet. The cmdlet enables you to enable or disable the SMBv1, SMBv2, and SMBv3 protocols on the server component.

You don't have to restart the computer after you run the Set-SMBServerConfiguration cmdlet.

SMBv1

  • Detect:

    Get-SmbServerConfiguration | Select EnableSMB1Protocol
  • Disable:

    Set-SmbServerConfiguration -EnableSMB1Protocol $false
  • Enable:

    Set-SmbServerConfiguration -EnableSMB1Protocol $true

For more information, see Server storage at Microsoft.

SMB v2/v3

  • Detect:

    Get-SmbServerConfiguration | Select EnableSMB2Protocol
  • Disable:

    Set-SmbServerConfiguration -EnableSMB2Protocol $false
  • Enable:

    Set-SmbServerConfiguration -EnableSMB2Protocol $true

For Windows 7, Windows Server 2008 R2, Windows Vista, and Windows Server 2008

To enable or disable SMB protocols on an SMB Server that is running Windows 7, Windows Server 2008 R2, Windows Vista, or Windows Server 2008, use Windows PowerShell or Registry Editor.

Additional PowerShell methods

Note

This method requires PowerShell 2.0 or later.

SMBv1 on SMB Server

Detect:

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

Default configuration = Enabled (No registry named value is created), so no SMB1 value will be returned

Disable:

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

Enable:

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

Note You must restart the computer after you make these changes.For more information, see Server storage at Microsoft.

SMBv2/v3 on SMB Server

Detect:

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

Disable:

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

Enable:

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

Note

You must restart the computer after you make these changes.

Registry Editor

Important

Follow the steps in this section carefully. Serious problems might occur if you modify the registry incorrectly. Before you modify it, back up the registry for restoration in case problems occur.

To enable or disable SMBv1 on the SMB server, configure the following registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters

Registry entry: SMB1REG_DWORD: 0 = DisabledREG_DWORD: 1 = EnabledDefault: 1 = Enabled(No registry key is created)

To enable or disable SMBv2 on the SMB server, configure the following registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters

Registry entry: SMB2REG_DWORD: 0 = DisabledREG_DWORD: 1 = EnabledDefault: 1 = Enabled(No registry key is created)

Note

You must restart the computer after you make these changes.

Disable SMBv1 by using Group Policy

This section introduces how to use Group Policy to disable SMBv1. You can use this method on different versions of Windows.

  • Server
  • Client

SMBv1

This procedure configures the following new item in the registry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters

  • Registry entry: SMB1
  • REG_DWORD: 0 = Disabled

To use Group Policy to configure this, follow these steps:

  1. Open the Group Policy Management Console. Right-click the Group Policy object (GPO) that should contain the new preference item, and then click Edit.

  2. In the console tree under Computer Configuration, expand the Preferences folder, and then expand the Windows Settings folder.

  3. Right-click the Registry node, point to New, and select Registry Item.

    How to detect, enable and disable SMBv1, SMBv2, and SMBv3 in Windows (3)

In the New Registry Properties dialog box, select the following:

  • Action: Create
  • Hive: HKEY_LOCAL_MACHINE
  • Key Path: SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
  • Value name: SMB1
  • Value type: REG_DWORD
  • Value data: 0

How to detect, enable and disable SMBv1, SMBv2, and SMBv3 in Windows (4)

This procedure disables the SMBv1 Server components. This Group Policy mustbe applied to all necessary workstations, servers, and domain controllers in the domain.

Note

WMI filters can also be set to exclude unsupported operating systems or selected exclusions, such as Windows XP.

Important

Be careful when you makethese changes on domain controllers on which legacy Windows XP or older Linux and third-party systems (that don't support SMBv2 or SMBv3) require access to SYSVOL or other file shares where SMB v1 is being disabled.

Auditing SMBv1 usage

To determine which clients are attempting to connect to an SMB server with SMBv1, you can enable auditing on Windows Server 2016, Windows 10, and Windows Server 2019. You can also audit on Windows 7 and Windows Server 2008 R2 if the May 2018 monthly update is installed, and on Windows 8.1 and Windows Server 2012 R2 if the July 2017 monthly update is installed.

  • Enable:

    Set-SmbServerConfiguration -AuditSmb1Access $true
  • Disable:

    Set-SmbServerConfiguration -AuditSmb1Access $false
  • Detect:

    Get-SmbServerConfiguration | Select AuditSmb1Access

When SMBv1 auditing is enabled, event 3000 appears in the "Microsoft-Windows-SMBServer\Audit" event log, identifying each client that attempts to connect with SMBv1.

Summary

If all the settings are in the same GPO, Group Policy Management displays the following settings.

How to detect, enable and disable SMBv1, SMBv2, and SMBv3 in Windows (5)

Testing and validation

After completing the configuration steps in this article, allow the policy to replicate and update. As necessary for testing, run gpupdate /force at a command prompt, and then review the target computers to make sure that the registry settings are applied correctly. Make sure SMBv2 and SMBv3 are functioning for all other systems in the environment.

Note

Don't forget to restartthe targetsystems.

FAQs

How do I know if SMB encryption is enabled? ›

Enable SMB Encryption with Windows Admin Center

Click Files & file sharing. Click the File shares tab. To require encryption on a share, click on the share name and select Enable SMB encryption.

How do I check my SMB on Windows 10? ›

[Network] SMB1 Sharing Protocol on Windows 10
  1. Click and open the Search Bar in Windows 10. Type Windows Features in the search bar. ...
  2. Scroll down to SMB 1.0/CIFS File Sharing Support.
  3. Check the box net to SMB 1.0/CIFS File Sharing Support and all other child boxes will auto populate. ...
  4. Click Restart Now to reboot the computer.

How do I disable SMB1 and enable SMB2? ›

Procedure
  1. From the Start menu, click Run....
  2. Type regedit in the Open field and click OK.
  3. Expand and locate the registry subtree as follows: ...
  4. Add a REG_DWORD key with the name of Smb2. ...
  5. Set the value to 0 to disable SMB2, or set it to 1 to re-enable SMB2.
  6. Restart the server.

How do I check SMB share in Windows? ›

Related Topics
  1. Open Control Panel in your PC/Notebook.
  2. Click on Programs.
  3. Click on Turn Windows features on or off link.
  4. Expand the SMB 1.0/CIFS File Sharing Support option.
  5. Check the SMB 1.0/CIFS Client option.
  6. Click the OK button.
  7. Click the Restart now button.
Jan 25, 2021

How do I enable SMB v3? ›

Go to Protocols > Windows Sharing (SMB) > Server Settings. In the Encryption section, under Enable SMBv3 encryption, select Use Custom. Check Enable SMBv3 encryption. Both encrypted and unencrypted clients are allowed access.

How do I enable SMB on Windows? ›

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.

How do you check what SMB version is running? ›

Open Powershell as an Administrator. Right click on the icon and say "Run as Administrator". Now, you're going to run 2 commands within 10 seconds or else Windows closes the ports as unused. Run Get-SmbConnection : your "Dialect" column is the version of your SMB.

How do I allow SMB through firewall Windows 10? ›

Open Control Panel, click System and Security, and then click Windows Firewall. In the left pane, click Advanced settings, and in the console tree, click Inbound Rules. Under Inbound Rules, locate the rules File and Printer Sharing (NB-Session-In) and File and Printer Sharing (SMB-In).

Is SMBv1 enabled on 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 set up SMB sharing in Windows 10? ›

4. Windows 10
  1. Right click on the created folder and select Properties.
  2. Click on the Sharing tab.
  3. Click the Share button.
  4. Type "Everyone" in the text box and click Add. ...
  5. The folder is now shared. ...
  6. Click on Advanced Sharing to check the advanced share properties.
Feb 21, 2021

Is SMB3 enabled by default? ›

You must enable SMB3 signing if the client or server uses any of these settings: SMB2/SMB3 signing set to required. SMB3 signing is enabled by default. SMB3 secure dialect negotiation (enabled by default on the Windows 8 client).

Should you disable SMBv2? ›

We recommend that you do not disable SMBv2 or SMBv3. Disable SMBv2 or SMBv3 only as a temporary troubleshooting measure.

How do I find SMBv1 on my network? ›

At a minimum, you should make sure that all Windows systems on your network have the MS17-010 patch applied. One of the easiest ways to detect SMBv1 activity on your network is to monitor and analyze network traffic going to and from your file servers.

What happens when you disable SMBv1? ›

By using this old protocol, you lose protections such as pre-authentication integrity, secure dialect negotiation, encryption, disabling insecure guest logins, and improved message signing. Microsoft has advised customers to stop using SMBv1 because it is extremely vulnerable and full of known exploits.

How do I access SMB services? ›

Connect to a SMB Share

In the Server Address field, enter smb:// to define the network protocol for SMB, and then enter either the IP address or the hostname of the server. To add the server to your Favorite Servers list, click the '+' button. Click Connect to connect to the share.

Is SMB encryption enabled by default? ›

By default, when SMB Encryption is enabled for a file share or server, only SMB 3.0, 3.02, and 3.1. 1 clients are allowed to access the specified file shares. It was difficult to narrow down the issue to 'Encryption' when many of the devices in our environment, which don't support SMB3, started failing.

How do I know if my network uses encryption? ›

How to identify your Wi-Fi security type:
  1. Find the Wi-Fi connection icon in the taskbar and click on it.
  2. Then click Properties underneath your current Wi-Fi connection.
  3. Scroll down and look for the Wi-Fi details under Properties.
  4. Under that, look for Security Type, which shows your Wi-Fi protocol.

How do I check network encryption mode? ›

To check the encryption type:
  1. Open the Settings app on your mobile device.
  2. Access the Wi-Fi connection settings.
  3. Find your wireless network on the list of available networks.
  4. Tap the network name or info button to pull up the network configuration.
  5. Check the network configuration for the security type.
Oct 19, 2017

How do I know if my SSD is self encrypted? ›

If you purchased a standalone HDD or SDD, the packaging, instructions, or user manual will likely tell you if the drive is equipped with self-encryption.

Is SMB v3 secure? ›

Of the 3 major SMB versions, SMB3 — particularly SMB 3.1. 1 — offers the most security. For example, SMB3's secure dialect negotiation limits susceptibility to man-in-the-middle (MITM) attacks and SMB 3.1. 1 uses secure and performant encryption algorithms like AES-128-GCM.

Is SMBv1 enabled by default? ›

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

How do I find my SMB credentials? ›

Test SMB Authentication
  1. From a system running Windows, open a Command Prompt.
  2. Type net use \\x.x.x.x\IPC$ * /user:Outpost24 replacing "x.x.x.x" with the IP address of the target system and replacing "Outpost24" with the username you need to test authentication with and press Enter.

References

Top Articles
Latest Posts
Article information

Author: Greg Kuvalis

Last Updated: 02/11/2023

Views: 5815

Rating: 4.4 / 5 (55 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Greg Kuvalis

Birthday: 1996-12-20

Address: 53157 Trantow Inlet, Townemouth, FL 92564-0267

Phone: +68218650356656

Job: IT Representative

Hobby: Knitting, Amateur radio, Skiing, Running, Mountain biking, Slacklining, Electronics

Introduction: My name is Greg Kuvalis, I am a witty, spotless, beautiful, charming, delightful, thankful, beautiful person who loves writing and wants to share my knowledge and understanding with you.