Use this when configuring the Windows SMB server.
SMB Server
The SMB server (LanmanServer) shares folders and printers from Windows. Configure dialects, signing and encryption with Set-SmbServerConfiguration and see sessions with Get-SmbSession.
1. Get-Service LanmanServer running.
2. Get-SmbServerConfiguration — SMB1 off, signing/encryption.
3. Firewall: File and Printer Sharing (SMB-In).
4. Sessions: Get-SmbSession.
5. Events: SMBServer/Operational.
LanmanServer → listener 445 → sessions → shares
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Common mistakes Narrow the fault
- Enabling SMB1 server for legacy clients.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- The SMB server runs as LanmanServer.
- Signing and encryption settings are server-wide.
- Sessions show connected clients.
Get-SmbShare— shares on the serverGet-SmbSession / Get-SmbOpenFile— sessions and open filesGet-SmbConnection— client connections and dialectGet-SmbServerConfiguration— server settings (signing, encryption, SMB1)Test-NetConnection <server> -Port 445— SMB port reachability
ReferenceWhy it matters1 section · depth on demand
What it is
The SMB server is the Server service (LanmanServer). It publishes shares, authenticates sessions and enforces server-side signing and encryption. Get-SmbSession and Get-SmbOpenFile show who is connected and which files are open — useful before maintenance.
ReferenceImportant terms & boundaries3 sections · depth on demand
In depth
Windows SMB server (LanmanServer) configuration:
Get-SmbServerConfiguration
Set-SmbServerConfiguration -EncryptData $true -RejectUnencryptedAccess $true -Confirm:$false
Get-SmbSession | ft ClientComputerName,ClientUserName,Dialect,NumOpens,SecondsExists
Get-SmbOpenFile | ? Path -like '*budget*' | Close-SmbOpenFile -Force
Set-SmbServerConfiguration -AuditSmb1Access $true
Audit SMB1 access before removing it (event 3000 in Microsoft-Windows-SMBServer/Audit), and enable SMB signing/encryption according to your security baseline.
Settings
Get-SmbServerConfiguration
Set-SmbServerConfiguration -EncryptData $true -RejectUnencryptedAccess $true
Get-SmbSession
Documented example, not captured output.
Commands
Get-SmbSession | Select ClientComputerName,ClientUserName,Dialect
Get-SmbOpenFile | Select ClientUserName,Path
Close-SmbOpenFile -FileId <id>
Documented example, not captured output.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in SMB → SMB Server. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/windows-server/storage/file-server/smb-overview · confidence 94%