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.
01Command
$ Get-SmbServerConfiguration | Select-Object EnableSMB1Protocol02What 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
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Get-SmbServerConfigurationEvidence: 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
Read the Authenticode signature status and signer of any executable or script in PowerShell.
Understand PowerShell's execution policy scopes and set the one that lets you run your own local scripts without gutting the security model.
Search inside text files and logs with regex, returning file, line number and match.