Skip to content

Commit 90a4328

Browse files
authored
Merge pull request #1356 from msbemba/patch-39
Update Get-SmbSession.md
2 parents f67c21b + ef65626 commit 90a4328

File tree

2 files changed

+45
-26
lines changed

2 files changed

+45
-26
lines changed

docset/winserver2012-ps/smbshare/Get-SmbSession.md

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The **Get-SmbSession** cmdlet retrieves basic information about the Server Messa
2727

2828
## EXAMPLES
2929

30-
### EXAMPLE 1
30+
### Example 1: Get session information
3131
```
3232
PS C:\>Get-SmbSession
3333
SessionId ClientComputerName ClientUserName NumOpens
@@ -52,21 +52,21 @@ SessionId ClientComputerName ClientUserName
5252
8813272891621 192.168.101.13 Contoso\Administrator 0
5353
```
5454

55-
This example retrieves information about the SMB sessions that are currently established between the SMB server and the associated clients.
55+
This command retrieves information about the SMB sessions that are currently established between the SMB server and the associated clients.
5656

57-
### EXAMPLE 2
57+
### Example 2: Get information for a specific session
5858
```
5959
PS C:\>Get-SmbSession -SessionId 8813272891621
6060
SessionId ClientComputerName ClientUserName NumOpens
6161
--------- ------------------ -------------- --------
6262
8813272891621 192.168.101.13 Contoso\Administrator 0
6363
```
6464

65-
This example retrieves information about the SMB session identified as 8813272891621 that is currently established between the SMB server and the associated clients.
65+
This command retrieves information about the SMB session identified as 8813272891621 that is currently established between the SMB server and the associated clients.
6666

67-
### EXAMPLE 3
67+
### Example 3: Get session information for a specific client
6868
```
69-
PS C:\>Get-SmbSession -ClientComputerName 192.168.102.14
69+
PS C:\>Get-SmbSession -ClientComputerName "192.168.102.14"
7070
SessionId ClientComputerName ClientUserName NumOpens
7171
--------- ------------------ -------------- --------
7272
4415226380377 192.168.102.14 Contoso\Contoso-HV2$ 1
@@ -77,11 +77,11 @@ SessionId ClientComputerName ClientUserName
7777
8813272891517 192.168.102.14 Contoso\Contoso-HV2$ 5
7878
```
7979

80-
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.
80+
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.
8181

82-
### EXAMPLE 4
82+
### Example 4: Get session information for a client
8383
```
84-
PS C:\>Get-SmbSession -ClientUserName Contoso\Contoso-HV1$
84+
PS C:\>Get-SmbSession -ClientUserName "Contoso\Contoso-HV1$"
8585
SessionId ClientComputerName ClientUserName NumOpens
8686
--------- ------------------ -------------- --------
8787
8813272891441 192.168.101.13 Contoso\Contoso-HV1$ 1
@@ -95,9 +95,9 @@ SessionId ClientComputerName ClientUserName
9595
8813272891613 192.168.101.13 Contoso\Contoso-HV1$ 2
9696
```
9797

98-
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$.
98+
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$.
9999

100-
### EXAMPLE 5
100+
### Example 5: Get all information for a session
101101
```
102102
PS C:\>Get-SmbSession -SessionId 8813272891441 | Select-Object -Property *
103103
ClientComputerName : 192.168.101.13
@@ -116,7 +116,8 @@ CimInstanceProperties : {ClientComputerName, ClientUserName, ClusterNodeName, Di
116116
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
117117
```
118118

119-
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.
119+
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.
120+
120121

121122
## PARAMETERS
122123

@@ -242,6 +243,23 @@ Accept pipeline input: True (ByPropertyName)
242243
Accept wildcard characters: False
243244
```
244245
246+
### -SmbInstance
247+
Specifies the input to this cmdlet.
248+
You can use this parameter, or you can pipe the input to this cmdlet.
249+
250+
```yaml
251+
Type: SmbInstance
252+
Parameter Sets: (All)
253+
Aliases:
254+
Accepted values: Default, CSV, SBL, SR
255+
256+
Required: False
257+
Position: Named
258+
Default value: None
259+
Accept pipeline input: True (ByPropertyName)
260+
Accept wildcard characters: False
261+
```
262+
245263
### -ThrottleLimit
246264
Specifies the maximum number of concurrent operations that can be established to run the cmdlet.
247265
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.

docset/winserver2012r2-ps/smbshare/Get-SmbSession.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The **Get-SmbSession** cmdlet retrieves basic information about the Server Messa
3535

3636
## EXAMPLES
3737

38-
### EXAMPLE 1
38+
### Example 1: Get session information
3939
```
4040
PS C:\>Get-SmbSession
4141
SessionId ClientComputerName ClientUserName NumOpens
@@ -60,21 +60,21 @@ SessionId ClientComputerName ClientUserName
6060
8813272891621 192.168.101.13 Contoso\Administrator 0
6161
```
6262

63-
This example retrieves information about the SMB sessions that are currently established between the SMB server and the associated clients.
63+
This command retrieves information about the SMB sessions that are currently established between the SMB server and the associated clients.
6464

65-
### EXAMPLE 2
65+
### Example 2: Get information for a specific session
6666
```
6767
PS C:\>Get-SmbSession -SessionId 8813272891621
6868
SessionId ClientComputerName ClientUserName NumOpens
6969
--------- ------------------ -------------- --------
7070
8813272891621 192.168.101.13 Contoso\Administrator 0
7171
```
7272

73-
This example retrieves information about the SMB session identified as 8813272891621 that is currently established between the SMB server and the associated clients.
73+
This command retrieves information about the SMB session identified as 8813272891621 that is currently established between the SMB server and the associated clients.
7474

75-
### EXAMPLE 3
75+
### Example 3: Get session information for a specific client
7676
```
77-
PS C:\>Get-SmbSession -ClientComputerName 192.168.102.14
77+
PS C:\>Get-SmbSession -ClientComputerName "192.168.102.14"
7878
SessionId ClientComputerName ClientUserName NumOpens
7979
--------- ------------------ -------------- --------
8080
4415226380377 192.168.102.14 Contoso\Contoso-HV2$ 1
@@ -85,11 +85,11 @@ SessionId ClientComputerName ClientUserName
8585
8813272891517 192.168.102.14 Contoso\Contoso-HV2$ 5
8686
```
8787

88-
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.
88+
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.
8989

90-
### EXAMPLE 4
90+
### Example 4: Get session information for a client
9191
```
92-
PS C:\>Get-SmbSession -ClientUserName Contoso\Contoso-HV1$
92+
PS C:\>Get-SmbSession -ClientUserName "Contoso\Contoso-HV1$"
9393
SessionId ClientComputerName ClientUserName NumOpens
9494
--------- ------------------ -------------- --------
9595
8813272891441 192.168.101.13 Contoso\Contoso-HV1$ 1
@@ -103,9 +103,9 @@ SessionId ClientComputerName ClientUserName
103103
8813272891613 192.168.101.13 Contoso\Contoso-HV1$ 2
104104
```
105105

106-
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$.
106+
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$.
107107

108-
### EXAMPLE 5
108+
### Example 5: Get all information for a session
109109
```
110110
PS C:\>Get-SmbSession -SessionId 8813272891441 | Select-Object -Property *
111111
ClientComputerName : 192.168.101.13
@@ -124,7 +124,7 @@ CimInstanceProperties : {ClientComputerName, ClientUserName, ClusterNodeName, Di
124124
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
125125
```
126126

127-
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.
127+
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.
128128

129129
## PARAMETERS
130130

@@ -251,13 +251,14 @@ Accept wildcard characters: False
251251
```
252252
253253
### -SmbInstance
254-
{{Fill SmbInstance Description}}
254+
Specifies the input to this cmdlet.
255+
You can use this parameter, or you can pipe the input to this cmdlet.
255256
256257
```yaml
257258
Type: SmbInstance
258259
Parameter Sets: (All)
259260
Aliases:
260-
Accepted values: Default, CSV
261+
Accepted values: Default, CSV, SBL, SR
261262

262263
Required: False
263264
Position: Named

0 commit comments

Comments
 (0)