Windows 10: Getting the SMB version in use for a specific remote host?
Andrew Mclaughlin
I have set up a SAMBA server on Ubuntu. I set the minimum protocol to SMB2, maximum to SMB3. Now, I can connect to the shared path from Windows, and I want to know which protocol (SMB2 or SMB3) Window is using. Is there any way to know that?
I have searched Google, but all I could find was the enabled versions of SMB on a Windows computer, not the version of SMB currently in use with a specific remote host. Let's say that I have opened a network-shared directory \\mybackup\test\ with File Explorer. Can I know which version of SMB Windows is currently using for mybackup?
1 Answer
Run Get-SmbConnection from PowerShell to list all outgoing SMB connections, together with their "Dialect" (which is how SMB calls the protocol versions).
Get-SmbConnection
Get-SmbConnection -ServerName mybackupIt can also show whether the connection is encrypted, although this is not included by default:
Get-SmbConnection | ft ServerName,ShareName,Dialect,Encrypted,UserName(Don't confuse this command with Get-SmbSession which is for incoming connections.)
You can also get this information on the server – Samba has a command smbstatus (requires root), which lists all inbound SMB connections like Get-SmbSession does on Windows.
$ sudo smbstatus
PS> Get-SmbSession | ft ClientComputerName,ClientUserName,Dialect