This is the built-in help made by Microsoft for the command 'Get-SmbSession', in PowerShell version 4 - as retrieved from
Windows version 'Microsoft Windows 8.1 Enterprise' PowerShell help files on 2016-06-23.
For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.
Retrieves information about the Server Message Block (SMB) sessions that are currently established between the SMB server and the associated clients.
Get-SmbSession [[-SessionId] <UInt64[]>] [[-ClientComputerName] <String[]>] [[-ClientUserName] <String[]>] [[-ScopeName] <String[]>] [[-ClusterNodeName] <String[]>] [
-AsJob] [-CimSession <CimSession[]>] [-IncludeHidden] [-ThrottleLimit <Int32>] [<CommonParameters>]
The Get-SmbSession cmdlet retrieves basic information about the Server Message Block (SMB) sessions that are currently established between the SMB server and the asso
ciated clients.
<
Online Version: http://go.microsoft.com/fwlink/?LinkId=289536
Close-SmbSession
<
EXAMPLE 1
PS C:\>Get-SmbSession
SessionId ClientComputerName ClientUserName NumOpens
--------- ------------------ -------------- --------
85899345929 [fe80::c8c0:f65d:3bc6:7313] Contoso\Contoso-FS1$ 0
4415226380377 192.168.102.14 Contoso\Contoso-HV2$ 1
4415226380385 192.168.102.14 Contoso\Contoso-HV2$ 1
4415226380393 192.168.102.14 Contoso\Contoso-HV2$ 5
8813272891397 [fe80::6484:f325:adff:39eb] Contoso\Contoso-FS2$ 0
8813272891441 192.168.101.13 Contoso\Contoso-HV1$ 1
8813272891449 192.168.101.13 Contoso\Contoso-HV1$ 1
8813272891457 192.168.101.13 Contoso\Contoso-HV1$ 1
8813272891461 192.168.101.13 Contoso\Contoso-HV1$ 1
8813272891469 192.168.101.13 Contoso\Contoso-HV1$ 5
8813272891489 192.168.102.14 Contoso\Contoso-HV2$ 1
8813272891493 192.168.102.14 Contoso\Contoso-HV2$ 1
8813272891517 192.168.102.14 Contoso\Contoso-HV2$ 5
8813272891581 192.168.102.13 Contoso\Contoso-HV1$ 1
8813272891585 192.168.102.13 Contoso\Contoso-HV1$ 1
8813272891609 192.168.102.13 Contoso\Contoso-HV1$ 3
8813272891613 192.168.101.13 Contoso\Contoso-HV1$ 2
8813272891621 192.168.101.13 Contoso\Administrator 0
This example retrieves information about the SMB sessions that are currently established between the SMB server and the associated clients.
EXAMPLE 2
PS C:\>Get-SmbSession -SessionId 8813272891621
SessionId ClientComputerName ClientUserName NumOpens
--------- ------------------ -------------- --------
8813272891621 192.168.101.13 Contoso\Administrator 0
This example retrieves information about the SMB session identified as 8813272891621 that is currently established between the SMB server and the associated clients.
EXAMPLE 3
PS C:\>Get-SmbSession -ClientComputerName 192.168.102.14
SessionId ClientComputerName ClientUserName NumOpens
--------- ------------------ -------------- --------
4415226380377 192.168.102.14 Contoso\Contoso-HV2$ 1
4415226380385 192.168.102.14 Contoso\Contoso-HV2$ 1
4415226380393 192.168.102.14 Contoso\Contoso-HV2$ 5
8813272891489 192.168.102.14 Contoso\Contoso-HV2$ 1
8813272891493 192.168.102.14 Contoso\Contoso-HV2$ 1
8813272891517 192.168.102.14 Contoso\Contoso-HV2$ 5
This example retrieves information about the SMB sessions that are currently established between the SMB server and the SMB client at the IP address 192.168.102.14.
EXAMPLE 4
PS C:\>Get-SmbSession -ClientUserName Contoso\Contoso-HV1$
SessionId ClientComputerName ClientUserName NumOpens
--------- ------------------ -------------- --------
8813272891441 192.168.101.13 Contoso\Contoso-HV1$ 1
8813272891449 192.168.101.13 Contoso\Contoso-HV1$ 1
8813272891457 192.168.101.13 Contoso\Contoso-HV1$ 1
8813272891461 192.168.101.13 Contoso\Contoso-HV1$ 1
8813272891469 192.168.101.13 Contoso\Contoso-HV1$ 5
8813272891581 192.168.102.13 Contoso\Contoso-HV1$ 1
8813272891585 192.168.102.13 Contoso\Contoso-HV1$ 1
8813272891609 192.168.102.13 Contoso\Contoso-HV1$ 3
8813272891613 192.168.101.13 Contoso\Contoso-HV1$ 2
This example retrieves information about the SMB sessions that are currently established between the SMB server and the SMB client with the user name Contoso\Contoso-
HV1$.
EXAMPLE 5
PS C:\>Get-SmbSession -SessionId 8813272891441 | Select-Object -Property *
ClientComputerName : 192.168.101.13
ClientUserName : Contoso\Contoso-HV1$
ClusterNodeName : Contoso-FS1
Dialect : 3.00
NumOpens : 1
ScopeName : Contoso-FS
SecondsExists : 45346
SecondsIdle : 33
SessionId : 8813272891441
TransportName :
PSComputerName :
CimClass : ROOT/Microsoft/Windows/SMB:MSFT_SmbSession
CimInstanceProperties : {ClientComputerName, ClientUserName, ClusterNodeName, Dialect...}
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
This example retrieves all of the information about the SMB session identified as 8813272891441 that are currently established between the SMB server and the SMB clie
nt.