Detect SMB vs SMB2 for network share

Zoë Peterson picture Zoë Peterson · Jan 17, 2014 · Viewed 13.4k times · Source

Given a UNC path like \\server\share, is there any way to determine, using the Win32 API, whether the local and remote computers are connecting using SMB or SMB2?

Answer

Zoë Peterson picture Zoë Peterson · Jan 29, 2014

After burning a paid support incident, the official answer from Microsoft is that this information isn't exposed by the driver in Windows 7. On Windows 8 it's available using WMI and the MSFT_SmbConnection class, or PowerShell's Get-SmbConnection cmdlet.