Skip to content

Commit ea6c458

Browse files
authored
Merge pull request #3788 from Xelu86/Update_SmbServerAlternativePort
Added new SMBServerAlternativePort cmdlet
2 parents 12460db + c3efbd9 commit ea6c458

File tree

4 files changed

+922
-0
lines changed

4 files changed

+922
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
---
2+
description: Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell.
3+
external help file: SmbServerAlternativePort.cdxml-help.xml
4+
Module Name: SmbShare
5+
ms.date: 02/22/2024
6+
online version: https://learn.microsoft.com/powershell/module/smbshare/get-smbserveralternativeport?view=windowsserver2025-ps&wt.mc_id=ps-gethelp
7+
schema: 2.0.0
8+
title: Get-SmbServerAlternativePort
9+
---
10+
11+
# Get-SmbServerAlternativePort
12+
13+
## SYNOPSIS
14+
Gets the alternative ports configured for the Server Message Block (SMB) protocol on the local
15+
server.
16+
17+
## SYNTAX
18+
19+
```
20+
Get-SmbServerAlternativePort [[-TransportType] <TransportType[]>] [[-Port] <UInt16[]>]
21+
[-IncludeHidden] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-AsJob]
22+
[<CommonParameters>]
23+
```
24+
25+
## DESCRIPTION
26+
27+
The `Get-SmbServerAlternativePort` retrieves the alternative ports configured for the Server
28+
Message Block (SMB) protocol on the local server. This cmdlet can be used to view the alternate
29+
ports that have been configured for SMB, which can be useful for troubleshooting or configuring
30+
firewalls. The cmdlet returns a list of the alternate ports that are currently configured for SMB
31+
on the local server.
32+
33+
## EXAMPLES
34+
35+
### Example 1: Get all SMB Server alternative ports
36+
37+
```powershell
38+
Get-SmbServerAlternativePort
39+
```
40+
41+
This command retrieves a list of all SMB server alternative ports that are currently configured on
42+
the local server.
43+
44+
## PARAMETERS
45+
46+
### -AsJob
47+
48+
Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to
49+
complete.
50+
51+
```yaml
52+
Type: SwitchParameter
53+
Parameter Sets: (All)
54+
Aliases:
55+
56+
Required: False
57+
Position: Named
58+
Default value: None
59+
Accept pipeline input: False
60+
Accept wildcard characters: False
61+
```
62+
63+
### -CimSession
64+
65+
Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session
66+
object, such as the output of a [New-CimSession](/powershell/module/cimcmdlets/new-cimsession)
67+
or [Get-CimSession](/powershell/module/cimcmdlets/get-cimsession) cmdlet. The default is the
68+
current session on the local computer.
69+
70+
```yaml
71+
Type: CimSession[]
72+
Parameter Sets: (All)
73+
Aliases: Session
74+
75+
Required: False
76+
Position: Named
77+
Default value: None
78+
Accept pipeline input: False
79+
Accept wildcard characters: False
80+
```
81+
82+
### -IncludeHidden
83+
84+
Not used.
85+
86+
```yaml
87+
Type: SwitchParameter
88+
Parameter Sets: (All)
89+
Aliases:
90+
91+
Required: False
92+
Position: Named
93+
Default value: None
94+
Accept pipeline input: False
95+
Accept wildcard characters: False
96+
```
97+
98+
### -Port
99+
100+
Specifies the port number that the SMB connection should use.
101+
102+
```yaml
103+
Type: UInt16[]
104+
Parameter Sets: (All)
105+
Aliases:
106+
107+
Required: False
108+
Position: 2
109+
Default value: None
110+
Accept pipeline input: True (ByPropertyName)
111+
Accept wildcard characters: False
112+
```
113+
114+
### -ThrottleLimit
115+
116+
Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If
117+
this parameter is omitted or a value of `0` is entered, then Windows PowerShell calculates an
118+
optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the
119+
computer. The throttle limit applies only to the current cmdlet, not to the session or to the
120+
computer.
121+
122+
```yaml
123+
Type: Int32
124+
Parameter Sets: (All)
125+
Aliases:
126+
127+
Required: False
128+
Position: Named
129+
Default value: None
130+
Accept pipeline input: False
131+
Accept wildcard characters: False
132+
```
133+
134+
### -TransportType
135+
136+
Specifies the transport protocol to use for the SMB connection. The only accepted value for this
137+
parameter is `QUIC`.
138+
139+
```yaml
140+
Type: TransportType[]
141+
Parameter Sets: (All)
142+
Aliases:
143+
Accepted values: QUIC
144+
145+
Required: False
146+
Position: 1
147+
Default value: None
148+
Accept pipeline input: True (ByPropertyName)
149+
Accept wildcard characters: False
150+
```
151+
152+
### CommonParameters
153+
154+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
155+
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
156+
-WarningAction, and -WarningVariable. For more information, see
157+
[about_CommonParameters](/powershell/module/microsoft.powershell.core/about/about_commonparameters).
158+
159+
## INPUTS
160+
161+
### Microsoft.PowerShell.Cmdletization.GeneratedTypes.SmbServerAlternativePort.TransportType[]
162+
163+
### System.UInt16[]
164+
165+
## OUTPUTS
166+
167+
### Microsoft.Management.Infrastructure.CimInstance
168+
169+
### Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/SMB/MSFT_SmbServerAlternativePort
170+
171+
## NOTES
172+
173+
## RELATED LINKS
174+
175+
[New-SmbServerAlternativePort](New-SmbServerAlternativePort.md)
176+
177+
[Remove-SmbServerAlternativePort](Remove-SmbServerAlternativePort.md)
178+
179+
[Set-SmbServerAlternativePort](Set-SmbServerAlternativePort.md)

0 commit comments

Comments
 (0)