Search code examples
windowswinapiosx-maverickssmbcifs

Detect SMB vs SMB2 for network share


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?


Solution

  • 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.