SERWER

 

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:PowerShell
  • Get-SmbServerConfiguration | Select EnableSMB1Protocol
    
  • Disable: PowerShell
  • Set-SmbServerConfiguration -EnableSMB1Protocol $false
    
  • Enable:  PowerShell
  • Set-SmbServerConfiguration -EnableSMB1Protocol $true
    

SMB v2/v3

  • Detect: PowerShell
  • Get-SmbServerConfiguration | Select EnableSMB2Protocol
    
  • Disable: PowerShell
  • Set-SmbServerConfiguration -EnableSMB2Protocol $false
    
  • Enable: PowerShell

Set-SmbServerConfiguration -EnableSMB2Protocol $true


CLIENT

Here is how to detect status, enable, and disable SMB protocols on the SMB Client that is running Windows 10, Windows Server 2019, Windows 8.1, Windows Server 2016, Windows Server 2012 R2, and Windows Server 2012.

SMBv1 on SMB Client

  • Detect Windows Command Prompt
  • sc.exe qc lanmanworkstation
    
  • Disable:  Windows Command Prompt
  • sc.exe config lanmanworkstation depend= bowser/mrxsmb20/nsi
    sc.exe config mrxsmb10 start= disabled
    
  • Enable:   Windows Command Prompt
  • sc.exe config lanmanworkstation depend= bowser/mrxsmb10/mrxsmb20/nsi
    sc.exe config mrxsmb10 start= auto
    

For more information, see Server storage at Microsoft

SMB v2/v3 on SMB Client

  • Detect:
    Windows Command Prompt
  • sc.exe qc lanmanworkstation
    
  • Disable:
    Windows Command Prompt
  • sc.exe config lanmanworkstation depend= bowser/mrxsmb10/nsi
    sc.exe config mrxsmb20 start= disabled
    
  • Enable:
    Windows Command Prompt
sc.exe config lanmanworkstation depend= bowser/mrxsmb10/mrxsmb20/nsi
sc.exe config mrxsmb20 start= auto