Check If SMBv1 Is Enabled (PowerShell)

Find out whether the legacy SMBv1 protocol — the one ransomware worms exploit — is still turned on for file sharing.

WindowssmbsecuritypowershellLow risk
Run Get-SmbServerConfiguration | Select-Object EnableSMB1Protocol in an elevated PowerShell — False means the unsafe protocol is off.

01Command

Command
$ Get-SmbServerConfiguration | Select-Object EnableSMB1Protocol

02What it does

SMBv1 is the 30-year-old file-sharing protocol exploited by WannaCry-style worms, and Windows disables it by default on modern installs; older NAS devices and legacy software are the usual reasons it gets re-enabled. The query prints True if the server still accepts SMBv1 connections. If it is True and you do not depend on an ancient NAS or printer, turn it off with Set-SmbServerConfiguration -EnableSMB1Protocol $false.

03Risk

RiskLow risk
RequirementsRun in an elevated (Administrator) PowerShell
!Warning: Disabling SMBv1 on a machine that still shares files with very old devices will break those connections — check what uses it first.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • Get-SmbServerConfiguration
    Microsoft Learn · vendor-doc · 2026-09-17
    Evidence: Documents the SMB server configuration properties, including EnableSMB1Protocol / EnableSMB2Protocol, which report whether each protocol version is enabled.

Last verified: 2026-09-18 · Category: Security & Privacy

06Related solutions