How to Disable SMBv2 in Vista and Windows 7

See also: Windows 7 Networking Problems

Windows Vista introduced a new SMB protocol, version 2. It often causes problems:

This affects Windows 7 too.

Turning off SMBv2 fixes these problems for me. If you are not having problems, however, the recommendation is to leave SMBv2 turned on.

Turning SMBv2 Off

Run the following two commands from an elevated command prompt:

sc config lanmanworkstation depend= bowser/mrxsmb10/nsi

This sets the following registry value:

HKLM\System\CurrentControlSet\services\LanmanWorkstation\DependOnService
Type:    REG_MULTI_SZ
Data:    bowser, mrxsmb10, nsi

sc config mrxsmb20 start= disabled

This sets the following registry value:

HKLM\System\CurrentControlSet\services\mrxsmb20\Start
Type:    REG_DWORD
Data:    4

Turning SMBv2 On Again

Run the following two commands from an elevated command prompt:

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

This sets the following registry value:

HKLM\System\CurrentControlSet\services\LanmanWorkstation\DependOnService
Type:    REG_MULTI_SZ
Data:    bowser, mrxsmb10, mrxsmb20, nsi

sc config mrxsmb20 start= auto

This sets the following registry value:

HKLM\System\CurrentControlSet\services\mrxsmb20\Start
Type:    REG_DWORD
Data:    2

Thanks

Thanks to Richard at axon IT for his blog post which helped me solve this problem.

More Info

Some really good info about the differences between SMBv1 and v2 here: http://www.danieletosatto.com/2010/10/22/smb-tuning-for-xenapp-and-file-servers-on-windows-server-2008/

This also mentions that SMB 2.0 Sessions are per user NOT per computer - this means that for example a terminal server or virtualised server will only open one connection on SMBv1. In this example SMBv2 will bring a great performance boost.