Skip to content

Commit a935671

Browse files
matt9ucciSean Wheeler
authored andcommitted
Fix parameter's position in Get-Random.md (#1901)
1 parent 05ff294 commit a935671

File tree

5 files changed

+42
-60
lines changed

5 files changed

+42
-60
lines changed

reference/3.0/Microsoft.PowerShell.Utility/Get-Random.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ Gets a random number, or selects objects randomly from a collection.
1414
## SYNTAX
1515

1616
### RandomNumberParameterSet (Default)
17-
```
18-
Get-Random [-SetSeed <Int32>] [[-Maximum] <Object>] [-Minimum <Object>] [<CommonParameters>]
17+
```powershell
18+
Get-Random [[-Maximum] <Object>] [-SetSeed <Int32>] [-Minimum <Object>]
19+
[<CommonParameters>]
1920
```
2021

2122
### RandomListItemParameterSet
22-
```
23-
Get-Random [-SetSeed <Int32>] [-InputObject] <Object[]> [-Count <Int32>] [<CommonParameters>]
23+
```powershell
24+
Get-Random [-InputObject] <Object[]> [-SetSeed <Int32>] [-Count <Int32>]
25+
[<CommonParameters>]
2426
```
2527

2628
## DESCRIPTION
@@ -172,7 +174,8 @@ PS C:\> Get-Random 10001
172174
```
173175

174176
This command gets a random integer less than 10001.
175-
Because the Maximum parameter has position 1, you can omit the parameter name when the value is the first or only unnamed parameter in the command.
177+
Because the **Maximum** parameter has position 0, you can omit the parameter name when the value is the first or only unnamed parameter in the command.
178+
176179
### Example 14
177180
```
178181
PS C:\> Get-Random -Minimum ([Int64]::MinValue)3738173363251507200
@@ -219,7 +222,7 @@ Parameter Sets: RandomListItemParameterSet
219222
Aliases:
220223

221224
Required: True
222-
Position: 1
225+
Position: 0
223226
Default value: None
224227
Accept pipeline input: True (ByValue)
225228
Accept wildcard characters: False
@@ -247,7 +250,7 @@ Parameter Sets: RandomNumberParameterSet
247250
Aliases:
248251

249252
Required: False
250-
Position: 1
253+
Position: 0
251254
Default value: Int32.MaxValue, Double.MaxValue, Int64.MaxValue
252255
Accept pipeline input: False
253256
Accept wildcard characters: False

reference/4.0/Microsoft.PowerShell.Utility/Get-Random.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ Gets a random number, or selects objects randomly from a collection.
1616
## SYNTAX
1717

1818
### RandomNumberParameterSet (Default)
19-
```
20-
Get-Random [-SetSeed <Int32>] [[-Maximum] <Object>] [-Minimum <Object>] [<CommonParameters>]
19+
```powershell
20+
Get-Random [[-Maximum] <Object>] [-SetSeed <Int32>] [-Minimum <Object>]
21+
[<CommonParameters>]
2122
```
2223

2324
### RandomListItemParameterSet
24-
```
25-
Get-Random [-SetSeed <Int32>] [-InputObject] <Object[]> [-Count <Int32>] [<CommonParameters>]
25+
```powershell
26+
Get-Random [-InputObject] <Object[]> [-SetSeed <Int32>] [-Count <Int32>]
27+
[<CommonParameters>]
2628
```
2729

2830
## DESCRIPTION
@@ -187,7 +189,7 @@ PS C:\> Get-Random 10001
187189
```
188190

189191
This command gets a random integer less than 10001.
190-
Because the Maximum parameter has position 1, you can omit the parameter name when the value is the first or only unnamed parameter in the command.
192+
Because the **Maximum** parameter has position 0, you can omit the parameter name when the value is the first or only unnamed parameter in the command.
191193

192194
### Example 14
193195
```
@@ -236,7 +238,7 @@ Parameter Sets: RandomListItemParameterSet
236238
Aliases:
237239

238240
Required: True
239-
Position: 1
241+
Position: 0
240242
Default value: None
241243
Accept pipeline input: True (ByValue)
242244
Accept wildcard characters: False
@@ -264,7 +266,7 @@ Parameter Sets: RandomNumberParameterSet
264266
Aliases:
265267

266268
Required: False
267-
Position: 1
269+
Position: 0
268270
Default value: Int32.MaxValue, Double.MaxValue, Int64.MaxValue
269271
Accept pipeline input: False
270272
Accept wildcard characters: False

reference/5.0/Microsoft.PowerShell.Utility/Get-Random.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ Gets a random number, or selects objects randomly from a collection.
1616
## SYNTAX
1717

1818
### RandomNumberParameterSet (Default)
19-
```
20-
Get-Random [-SetSeed <Int32>] [[-Maximum] <Object>] [-Minimum <Object>] [<CommonParameters>]
19+
```powershell
20+
Get-Random [[-Maximum] <Object>] [-SetSeed <Int32>] [-Minimum <Object>]
21+
[<CommonParameters>]
2122
```
2223

2324
### RandomListItemParameterSet
24-
```
25-
Get-Random [-SetSeed <Int32>] [-InputObject] <Object[]> [-Count <Int32>] [<CommonParameters>]
25+
```powershell
26+
Get-Random [-InputObject] <Object[]> [-SetSeed <Int32>] [-Count <Int32>]
27+
[<CommonParameters>]
2628
```
2729

2830
## DESCRIPTION
@@ -186,7 +188,7 @@ PS C:\> Get-Random 10001
186188
```
187189

188190
This command gets a random integer less than 10001.
189-
Because the *Maximum* parameter has position 1, you can omit the parameter name when the value is the first or only unnamed parameter in the command.
191+
Because the **Maximum** parameter has position 0, you can omit the parameter name when the value is the first or only unnamed parameter in the command.
190192

191193
### Example 14: Get random 64-bit numbers
192194
```

reference/5.1/Microsoft.PowerShell.Utility/Get-Random.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ Gets a random number, or selects objects randomly from a collection.
1616
## SYNTAX
1717

1818
### RandomNumberParameterSet (Default)
19-
```
20-
Get-Random [-SetSeed <Int32>] [[-Maximum] <Object>] [-Minimum <Object>] [<CommonParameters>]
19+
```powershell
20+
Get-Random [[-Maximum] <Object>] [-SetSeed <Int32>] [-Minimum <Object>]
21+
[<CommonParameters>]
2122
```
2223

2324
### RandomListItemParameterSet
24-
```
25-
Get-Random [-SetSeed <Int32>] [-InputObject] <Object[]> [-Count <Int32>] [<CommonParameters>]
25+
```powershell
26+
Get-Random [-InputObject] <Object[]> [-SetSeed <Int32>] [-Count <Int32>]
27+
[<CommonParameters>]
2628
```
2729

2830
## DESCRIPTION
@@ -186,7 +188,7 @@ PS C:\> Get-Random 10001
186188
```
187189

188190
This command gets a random integer less than 10001.
189-
Because the *Maximum* parameter has position 1, you can omit the parameter name when the value is the first or only unnamed parameter in the command.
191+
Because the **Maximum** parameter has position 0, you can omit the parameter name when the value is the first or only unnamed parameter in the command.
190192

191193
### Example 14: Get random 64-bit numbers
192194
```

reference/6/Microsoft.PowerShell.Utility/Get-Random.md

Lines changed: 9 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ Gets a random number, or selects objects randomly from a collection.
1616
## SYNTAX
1717

1818
### RandomNumberParameterSet (Default)
19-
```
20-
Get-Random [-SetSeed <Int32>] [[-Maximum] <Object>] [-Minimum <Object>] [-InformationAction <ActionPreference>]
21-
[-InformationVariable <String>] [<CommonParameters>]
19+
```powershell
20+
Get-Random [[-Maximum] <Object>] [-SetSeed <Int32>] [-Minimum <Object>]
21+
[<CommonParameters>]
2222
```
2323

2424
### RandomListItemParameterSet
25-
```
26-
Get-Random [-SetSeed <Int32>] [-InputObject] <Object[]> [-Count <Int32>]
27-
[-InformationAction <ActionPreference>] [-InformationVariable <String>] [<CommonParameters>]
25+
```powershell
26+
Get-Random [-InputObject] <Object[]> [-SetSeed <Int32>] [-Count <Int32>]
27+
[<CommonParameters>]
2828
```
2929

3030
## DESCRIPTION
@@ -188,7 +188,7 @@ PS C:\> Get-Random 10001
188188
```
189189

190190
This command gets a random integer less than 10001.
191-
Because the *Maximum* parameter has position 1, you can omit the parameter name when the value is the first or only unnamed parameter in the command.
191+
Because the **Maximum** parameter has position 0, you can omit the parameter name when the value is the first or only unnamed parameter in the command.
192192

193193
### Example 14: Get random 64-bit numbers
194194
```
@@ -224,33 +224,6 @@ Accept pipeline input: False
224224
Accept wildcard characters: False
225225
```
226226
227-
### -InformationAction
228-
```yaml
229-
Type: ActionPreference
230-
Parameter Sets: (All)
231-
Aliases: infa
232-
Accepted values: SilentlyContinue, Stop, Continue, Inquire, Ignore, Suspend
233-
234-
Required: False
235-
Position: Named
236-
Default value: None
237-
Accept pipeline input: False
238-
Accept wildcard characters: False
239-
```
240-
241-
### -InformationVariable
242-
```yaml
243-
Type: String
244-
Parameter Sets: (All)
245-
Aliases: iv
246-
247-
Required: False
248-
Position: Named
249-
Default value: None
250-
Accept pipeline input: False
251-
Accept wildcard characters: False
252-
```
253-
254227
### -InputObject
255228
Specifies a collection of objects.
256229
**Get-Random** gets randomly selected objects in random order from the collection.
@@ -263,7 +236,7 @@ Parameter Sets: RandomListItemParameterSet
263236
Aliases:
264237

265238
Required: True
266-
Position: 1
239+
Position: 0
267240
Default value: None
268241
Accept pipeline input: True (ByValue)
269242
Accept wildcard characters: False
@@ -291,7 +264,7 @@ Parameter Sets: RandomNumberParameterSet
291264
Aliases:
292265

293266
Required: False
294-
Position: 1
267+
Position: 0
295268
Default value: None
296269
Accept pipeline input: False
297270
Accept wildcard characters: False

0 commit comments

Comments
 (0)