Tutorials › Security hardening
Find and switch off SMBv1 on Windows Server
SMBv1 is the 1980s-era version of Windows file sharing. It has serious known weaknesses and Microsoft strongly advises against using it. Newer Windows versions don't install it, but servers that were upgraded in place, or built from old images, can still have it. This guide checks for it, logs anything still using it, then switches it off safely.
Before you start
- You need local administrator rights on the server, and an elevated PowerShell window (right-click Windows PowerShell and choose Run as administrator).
- Microsoft says SMBv1 is not installed by default on Windows Server 2019 and later, Windows 11, and Windows 10 except Home and Pro. Older servers and upgraded machines are the ones to check.
- Pick a maintenance window. Removing the feature restarts the server.
Turning off SMBv1 can break very old devices and software, such as old scanners, NAS boxes or legacy apps that only speak SMBv1. Be especially careful on domain controllers if any old systems need SYSVOL access. Do the audit step first so you know what will stop working.
Steps
1. Check whether SMBv1 is on
- Open PowerShell as administrator on the server.
- Check whether the SMBv1 server is enabled:
False means the SMBv1 server is off. True means it is on.Get-SmbServerConfiguration | Select EnableSMB1Protocol - Check whether the SMBv1 feature is installed at all:
Look at the State line. Disabled means it isn't installed. Enabled means it is.Get-WindowsOptionalFeature -Online -FeatureName SMB1Protocol - If both show it is off, you're done. Skip to "Check it worked".
2. Find out what still uses SMBv1
- Turn on SMBv1 access auditing:
Type Y and press Enter if asked to confirm.Set-SmbServerConfiguration -AuditSmb1Access $true - Leave it running for a few days, ideally across a normal working week, so devices that only connect occasionally show up.
- Open Event Viewer (press Windows + R, type
eventvwr.msc, press Enter). - Go to Applications and Services Logs > Microsoft > Windows > SMBServer > Audit.
- Look for Event ID 3000. Each one is an SMBv1 connection attempt, and the details show which client made it.
- No 3000 events means nothing is using SMBv1. If you find some, update or replace those devices first. Microsoft recommends updating the device rather than keeping SMBv1.
3. Switch off the SMBv1 server (no restart)
- Run:
Confirm with Y. Microsoft says no restart is needed for this command.Set-SmbServerConfiguration -EnableSMB1Protocol $false - This stops the server accepting SMBv1 connections straight away, and is easy to reverse if something breaks.
4. Remove the SMBv1 feature completely
This step restarts the server. Do it in your maintenance window.
- Option A, PowerShell:
Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol - Option B, Server Manager (older Windows Server versions):
- Open Server Manager.
- On the Dashboard, under Configure this local server, select Add roles and features.
- On Before you begin, select Start the Remove Roles and Features Wizard, then Next.
- On Select destination server, confirm your server is selected, then Next.
- On Remove server roles, select Next.
- On Remove features, clear SMB 1.0/CIFS File Sharing Support, then Next.
- On Confirm removal selections, check the feature is listed, then select Remove. Restart when prompted.
Check it worked
- After the restart, run:
You should see EnableSMB1Protocol : False and State : Disabled.Get-SmbServerConfiguration | Format-List EnableSMB1Protocol Get-WindowsOptionalFeature -Online -FeatureName SMB1Protocol - From a normal workstation, open a share on the server (for example
\\SERVERNAME\share) to confirm modern clients still connect. - Check any devices you found in step 2, such as scanners that save to a share, still work.
- Once you're happy, you can turn auditing back off:
Set-SmbServerConfiguration -AuditSmb1Access $false
If something breaks after this, don't turn SMBv1 back on as a quick fix if you can avoid it. Update the device or its firmware instead. Microsoft also warns not to disable SMB signing to work around connection problems on Windows Server 2025 and Windows 11 24H2, which require signing by default.