Skip to main content
added 4 characters in body
Source Link
Robert
  • 7.9k
  • 3
  • 36
  • 54

Note: I recognized that this only works for shares where the credentials how not been saved. For shares where you have saved the credentials instead your current logged-in user-account is shown. Therefore for connections using saved connections you have to check Windows Credential Manager what username is used for establishing the connection. Tested on Windows 10 20H2 joined a Windows domain.

Note: I recognized that this only works for shares where the credentials are not been saved. For shares where you have saved the credentials instead your current logged-in user-account is shown. Therefore for connections using saved connections you have to check Windows Credential Manager what username is used for establishing the connection. Tested on Windows 10 20H2 joined a Windows domain.

Note: I recognized that this only works for shares where the credentials how not been saved. For shares where you have saved the credentials instead your current logged-in user-account is shown. Therefore for connections using saved connections you have to check Windows Credential Manager what username is used for establishing the connection. Tested on Windows 10 20H2 joined a Windows domain.

Note: I recognized that this only works for shares where the credentials are not been saved. For shares where you have saved the credentials instead your current logged-in user-account is shown. Therefore for connections using saved connections you have to check Windows Credential Manager what username is used for establishing the connection. Tested on Windows 10 20H2 joined a Windows domain.

added 474 characters in body
Source Link
Robert
  • 7.9k
  • 3
  • 36
  • 54

You can use the PowerShell command Get-SmbConnection (local admin permissions required).

I have tested this command on a Windows 10 client and it shows all my network connections similar like the following sample output.

Note: I recognized that this only works for shares where the credentials how not been saved. For shares where you have saved the credentials instead your current logged-in user-account is shown. Therefore for connections using saved connections you have to check Windows Credential Manager what username is used for establishing the connection. Tested on Windows 10 20H2 joined a Windows domain.

PS C:\>Get-SmbConnection
ServerName          ShareName           UserName             Credential           Dialect             NumOpens 
----------          ---------           --------             ----------           -------             -------- 
Contoso-FS1         VMS5                Contoso\Contoso-HV1$ Contoso\Contoso-HV1$ 3.00                1 
Contoso-FS1         VMS5                NT VIRTUAL MACHI...  Contoso\Contoso-HV1$ 3.00                3 
Contoso-FS          VMS1                Contoso\Contoso-HV1$ Contoso\Contoso-HV1$ 3.00                1 
Contoso-FS          VMS1                NT VIRTUAL MACHI...  Contoso\Contoso-HV1$ 3.00                5 
Contoso-SO          VMS3                Contoso\Contoso-HV1$ Contoso\Contoso-HV1$ 3.00                1 
Contoso-SO          VMS3                NT VIRTUAL MACHI...  Contoso\Contoso-HV1$ 3.00                1 
Contoso-SO          VMS3                NT VIRTUAL MACHI...  Contoso\Contoso-HV1$ 3.00                2

Sample copied from Microsoft: https://docs.microsoft.com/en-us/powershell/module/smbshare/get-smbconnection?view=windowsserver2019-ps

You can use the PowerShell command Get-SmbConnection (local admin permissions required).

I have tested this command on a Windows 10 client and it shows all my network connections similar like the following sample output:

PS C:\>Get-SmbConnection
ServerName          ShareName           UserName             Credential           Dialect             NumOpens 
----------          ---------           --------             ----------           -------             -------- 
Contoso-FS1         VMS5                Contoso\Contoso-HV1$ Contoso\Contoso-HV1$ 3.00                1 
Contoso-FS1         VMS5                NT VIRTUAL MACHI...  Contoso\Contoso-HV1$ 3.00                3 
Contoso-FS          VMS1                Contoso\Contoso-HV1$ Contoso\Contoso-HV1$ 3.00                1 
Contoso-FS          VMS1                NT VIRTUAL MACHI...  Contoso\Contoso-HV1$ 3.00                5 
Contoso-SO          VMS3                Contoso\Contoso-HV1$ Contoso\Contoso-HV1$ 3.00                1 
Contoso-SO          VMS3                NT VIRTUAL MACHI...  Contoso\Contoso-HV1$ 3.00                1 
Contoso-SO          VMS3                NT VIRTUAL MACHI...  Contoso\Contoso-HV1$ 3.00                2

Sample copied from Microsoft: https://docs.microsoft.com/en-us/powershell/module/smbshare/get-smbconnection?view=windowsserver2019-ps

You can use the PowerShell command Get-SmbConnection (local admin permissions required).

I have tested this command on a Windows 10 client and it shows all my network connections similar like the following sample output.

Note: I recognized that this only works for shares where the credentials how not been saved. For shares where you have saved the credentials instead your current logged-in user-account is shown. Therefore for connections using saved connections you have to check Windows Credential Manager what username is used for establishing the connection. Tested on Windows 10 20H2 joined a Windows domain.

PS C:\>Get-SmbConnection
ServerName          ShareName           UserName             Credential           Dialect             NumOpens 
----------          ---------           --------             ----------           -------             -------- 
Contoso-FS1         VMS5                Contoso\Contoso-HV1$ Contoso\Contoso-HV1$ 3.00                1 
Contoso-FS1         VMS5                NT VIRTUAL MACHI...  Contoso\Contoso-HV1$ 3.00                3 
Contoso-FS          VMS1                Contoso\Contoso-HV1$ Contoso\Contoso-HV1$ 3.00                1 
Contoso-FS          VMS1                NT VIRTUAL MACHI...  Contoso\Contoso-HV1$ 3.00                5 
Contoso-SO          VMS3                Contoso\Contoso-HV1$ Contoso\Contoso-HV1$ 3.00                1 
Contoso-SO          VMS3                NT VIRTUAL MACHI...  Contoso\Contoso-HV1$ 3.00                1 
Contoso-SO          VMS3                NT VIRTUAL MACHI...  Contoso\Contoso-HV1$ 3.00                2

Sample copied from Microsoft: https://docs.microsoft.com/en-us/powershell/module/smbshare/get-smbconnection?view=windowsserver2019-ps

Post Undeleted by Robert
Post Deleted by Robert
Source Link
Robert
  • 7.9k
  • 3
  • 36
  • 54

You can use the PowerShell command Get-SmbConnection (local admin permissions required).

I have tested this command on a Windows 10 client and it shows all my network connections similar like the following sample output:

PS C:\>Get-SmbConnection
ServerName          ShareName           UserName             Credential           Dialect             NumOpens 
----------          ---------           --------             ----------           -------             -------- 
Contoso-FS1         VMS5                Contoso\Contoso-HV1$ Contoso\Contoso-HV1$ 3.00                1 
Contoso-FS1         VMS5                NT VIRTUAL MACHI...  Contoso\Contoso-HV1$ 3.00                3 
Contoso-FS          VMS1                Contoso\Contoso-HV1$ Contoso\Contoso-HV1$ 3.00                1 
Contoso-FS          VMS1                NT VIRTUAL MACHI...  Contoso\Contoso-HV1$ 3.00                5 
Contoso-SO          VMS3                Contoso\Contoso-HV1$ Contoso\Contoso-HV1$ 3.00                1 
Contoso-SO          VMS3                NT VIRTUAL MACHI...  Contoso\Contoso-HV1$ 3.00                1 
Contoso-SO          VMS3                NT VIRTUAL MACHI...  Contoso\Contoso-HV1$ 3.00                2

Sample copied from Microsoft: https://docs.microsoft.com/en-us/powershell/module/smbshare/get-smbconnection?view=windowsserver2019-ps