List active SMB connections and dialects on Windows
Show currently established SMB file-sharing connections and the negotiated protocol version of each with Get-SmbConnection.
01Command
$ Get-SmbConnection | Format-Table ServerName,ShareName,Dialect,NumOpens -AutoSize02What it does
Dialect is the interesting column: a 2.0.2 or older value against a NAS means the client fell back to an old protocol, and anything negotiating SMB 1 (sometimes shown when scanning with Get-SmbServerNetworkInterface on servers) is the red flag behind WannaCry-era exploits. Unlike net use, which lists mapped drive letters, Get-SmbConnection shows connections without drive letters too. Its counterpart Get-SmbSession does the same from the server side.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Get-SmbConnection | Microsoft LearnEvidence: Microsoft documents Get-SmbConnection as retrieving established SMB connections between the SMB client and servers, including the negotiated Dialect.
Last verified: 2026-09-17 · Category: Network
06Related solutions
A built-in PowerShell one-liner that answers 'is port 5432/3389/443 actually open through this network?' — no telnet client needed.
The PowerShell-native replacement for netstat: filter connections by state, port, or process and pipe results instead of parsing text.
The modern, scriptable replacement for nslookup: ask for exact record types, hit specific DNS servers, and see TTLs as objects.