Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 30 additions & 12 deletions docset/winserver2012-ps/smbshare/Get-SmbSession.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The **Get-SmbSession** cmdlet retrieves basic information about the Server Messa

## EXAMPLES

### EXAMPLE 1
### Example 1: Get session information
```
PS C:\>Get-SmbSession
SessionId ClientComputerName ClientUserName NumOpens
Expand All @@ -52,21 +52,21 @@ SessionId ClientComputerName ClientUserName
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.
This command retrieves information about the SMB sessions that are currently established between the SMB server and the associated clients.

### EXAMPLE 2
### Example 2: Get information for a specific session
```
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.
This command retrieves information about the SMB session identified as 8813272891621 that is currently established between the SMB server and the associated clients.

### EXAMPLE 3
### Example 3: Get session information for a specific client
```
PS C:\>Get-SmbSession -ClientComputerName 192.168.102.14
PS C:\>Get-SmbSession -ClientComputerName "192.168.102.14"
SessionId ClientComputerName ClientUserName NumOpens
--------- ------------------ -------------- --------
4415226380377 192.168.102.14 Contoso\Contoso-HV2$ 1
Expand All @@ -77,11 +77,11 @@ SessionId ClientComputerName ClientUserName
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.
This command 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
### Example 4: Get session information for a client
```
PS C:\>Get-SmbSession -ClientUserName Contoso\Contoso-HV1$
PS C:\>Get-SmbSession -ClientUserName "Contoso\Contoso-HV1$"
SessionId ClientComputerName ClientUserName NumOpens
--------- ------------------ -------------- --------
8813272891441 192.168.101.13 Contoso\Contoso-HV1$ 1
Expand All @@ -95,9 +95,9 @@ SessionId ClientComputerName ClientUserName
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$.
This command retrieves information about the SMB sessions that are currently established between the SMB server and the SMB client that has the user name Contoso\Contoso-HV1$.

### EXAMPLE 5
### Example 5: Get all information for a session
```
PS C:\>Get-SmbSession -SessionId 8813272891441 | Select-Object -Property *
ClientComputerName : 192.168.101.13
Expand All @@ -116,7 +116,8 @@ CimInstanceProperties : {ClientComputerName, ClientUserName, ClusterNodeName, Di
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 client.
This command retrieves all of the information about the SMB session identified as 8813272891441 that are currently established between the SMB server and the SMB client.


## PARAMETERS

Expand Down Expand Up @@ -242,6 +243,23 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -SmbInstance
Specifies the input to this cmdlet.
You can use this parameter, or you can pipe the input to this cmdlet.

```yaml
Type: SmbInstance
Parameter Sets: (All)
Aliases:
Accepted values: Default, CSV, SBL, SR

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -ThrottleLimit
Specifies the maximum number of concurrent operations that can be established to run the cmdlet.
If this parameter is omitted or a value of `0` is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer.
Expand Down
29 changes: 15 additions & 14 deletions docset/winserver2012r2-ps/smbshare/Get-SmbSession.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The **Get-SmbSession** cmdlet retrieves basic information about the Server Messa

## EXAMPLES

### EXAMPLE 1
### Example 1: Get session information
```
PS C:\>Get-SmbSession
SessionId ClientComputerName ClientUserName NumOpens
Expand All @@ -60,21 +60,21 @@ SessionId ClientComputerName ClientUserName
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.
This command retrieves information about the SMB sessions that are currently established between the SMB server and the associated clients.

### EXAMPLE 2
### Example 2: Get information for a specific session
```
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.
This command retrieves information about the SMB session identified as 8813272891621 that is currently established between the SMB server and the associated clients.

### EXAMPLE 3
### Example 3: Get session information for a specific client
```
PS C:\>Get-SmbSession -ClientComputerName 192.168.102.14
PS C:\>Get-SmbSession -ClientComputerName "192.168.102.14"
SessionId ClientComputerName ClientUserName NumOpens
--------- ------------------ -------------- --------
4415226380377 192.168.102.14 Contoso\Contoso-HV2$ 1
Expand All @@ -85,11 +85,11 @@ SessionId ClientComputerName ClientUserName
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.
This command 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
### Example 4: Get session information for a client
```
PS C:\>Get-SmbSession -ClientUserName Contoso\Contoso-HV1$
PS C:\>Get-SmbSession -ClientUserName "Contoso\Contoso-HV1$"
SessionId ClientComputerName ClientUserName NumOpens
--------- ------------------ -------------- --------
8813272891441 192.168.101.13 Contoso\Contoso-HV1$ 1
Expand All @@ -103,9 +103,9 @@ SessionId ClientComputerName ClientUserName
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$.
This command retrieves information about the SMB sessions that are currently established between the SMB server and the SMB client that has the user name Contoso\Contoso-HV1$.

### EXAMPLE 5
### Example 5: Get all information for a session
```
PS C:\>Get-SmbSession -SessionId 8813272891441 | Select-Object -Property *
ClientComputerName : 192.168.101.13
Expand All @@ -124,7 +124,7 @@ CimInstanceProperties : {ClientComputerName, ClientUserName, ClusterNodeName, Di
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 client.
This command retrieves all of the information about the SMB session identified as 8813272891441 that are currently established between the SMB server and the SMB client.

## PARAMETERS

Expand Down Expand Up @@ -251,13 +251,14 @@ Accept wildcard characters: False
```

### -SmbInstance
{{Fill SmbInstance Description}}
Specifies the input to this cmdlet.
You can use this parameter, or you can pipe the input to this cmdlet.

```yaml
Type: SmbInstance
Parameter Sets: (All)
Aliases:
Accepted values: Default, CSV
Accepted values: Default, CSV, SBL, SR

Required: False
Position: Named
Expand Down