Skip to content

Fix parameter's position in Get-Random.md #1901

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
17 changes: 10 additions & 7 deletions reference/3.0/Microsoft.PowerShell.Utility/Get-Random.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ Gets a random number, or selects objects randomly from a collection.
## SYNTAX

### RandomNumberParameterSet (Default)
```
Get-Random [-SetSeed <Int32>] [[-Maximum] <Object>] [-Minimum <Object>] [<CommonParameters>]
```powershell
Get-Random [[-Maximum] <Object>] [-SetSeed <Int32>] [-Minimum <Object>]
[<CommonParameters>]
```

### RandomListItemParameterSet
```
Get-Random [-SetSeed <Int32>] [-InputObject] <Object[]> [-Count <Int32>] [<CommonParameters>]
```powershell
Get-Random [-InputObject] <Object[]> [-SetSeed <Int32>] [-Count <Int32>]
[<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -172,7 +174,8 @@ PS C:\> Get-Random 10001
```

This command gets a random integer less than 10001.
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.
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.

### Example 14
```
PS C:\> Get-Random -Minimum ([Int64]::MinValue)3738173363251507200
Expand Down Expand Up @@ -219,7 +222,7 @@ Parameter Sets: RandomListItemParameterSet
Aliases:

Required: True
Position: 1
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Expand Down Expand Up @@ -247,7 +250,7 @@ Parameter Sets: RandomNumberParameterSet
Aliases:

Required: False
Position: 1
Position: 0
Default value: Int32.MaxValue, Double.MaxValue, Int64.MaxValue
Accept pipeline input: False
Accept wildcard characters: False
Expand Down
16 changes: 9 additions & 7 deletions reference/4.0/Microsoft.PowerShell.Utility/Get-Random.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ Gets a random number, or selects objects randomly from a collection.
## SYNTAX

### RandomNumberParameterSet (Default)
```
Get-Random [-SetSeed <Int32>] [[-Maximum] <Object>] [-Minimum <Object>] [<CommonParameters>]
```powershell
Get-Random [[-Maximum] <Object>] [-SetSeed <Int32>] [-Minimum <Object>]
[<CommonParameters>]
```

### RandomListItemParameterSet
```
Get-Random [-SetSeed <Int32>] [-InputObject] <Object[]> [-Count <Int32>] [<CommonParameters>]
```powershell
Get-Random [-InputObject] <Object[]> [-SetSeed <Int32>] [-Count <Int32>]
[<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -187,7 +189,7 @@ PS C:\> Get-Random 10001
```

This command gets a random integer less than 10001.
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.
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.

### Example 14
```
Expand Down Expand Up @@ -236,7 +238,7 @@ Parameter Sets: RandomListItemParameterSet
Aliases:

Required: True
Position: 1
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Expand Down Expand Up @@ -264,7 +266,7 @@ Parameter Sets: RandomNumberParameterSet
Aliases:

Required: False
Position: 1
Position: 0
Default value: Int32.MaxValue, Double.MaxValue, Int64.MaxValue
Accept pipeline input: False
Accept wildcard characters: False
Expand Down
12 changes: 7 additions & 5 deletions reference/5.0/Microsoft.PowerShell.Utility/Get-Random.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ Gets a random number, or selects objects randomly from a collection.
## SYNTAX

### RandomNumberParameterSet (Default)
```
Get-Random [-SetSeed <Int32>] [[-Maximum] <Object>] [-Minimum <Object>] [<CommonParameters>]
```powershell
Get-Random [[-Maximum] <Object>] [-SetSeed <Int32>] [-Minimum <Object>]
[<CommonParameters>]
```

### RandomListItemParameterSet
```
Get-Random [-SetSeed <Int32>] [-InputObject] <Object[]> [-Count <Int32>] [<CommonParameters>]
```powershell
Get-Random [-InputObject] <Object[]> [-SetSeed <Int32>] [-Count <Int32>]
[<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -186,7 +188,7 @@ PS C:\> Get-Random 10001
```

This command gets a random integer less than 10001.
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.
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.

### Example 14: Get random 64-bit numbers
```
Expand Down
12 changes: 7 additions & 5 deletions reference/5.1/Microsoft.PowerShell.Utility/Get-Random.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ Gets a random number, or selects objects randomly from a collection.
## SYNTAX

### RandomNumberParameterSet (Default)
```
Get-Random [-SetSeed <Int32>] [[-Maximum] <Object>] [-Minimum <Object>] [<CommonParameters>]
```powershell
Get-Random [[-Maximum] <Object>] [-SetSeed <Int32>] [-Minimum <Object>]
[<CommonParameters>]
```

### RandomListItemParameterSet
```
Get-Random [-SetSeed <Int32>] [-InputObject] <Object[]> [-Count <Int32>] [<CommonParameters>]
```powershell
Get-Random [-InputObject] <Object[]> [-SetSeed <Int32>] [-Count <Int32>]
[<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -186,7 +188,7 @@ PS C:\> Get-Random 10001
```

This command gets a random integer less than 10001.
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.
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.

### Example 14: Get random 64-bit numbers
```
Expand Down
45 changes: 9 additions & 36 deletions reference/6/Microsoft.PowerShell.Utility/Get-Random.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ Gets a random number, or selects objects randomly from a collection.
## SYNTAX

### RandomNumberParameterSet (Default)
```
Get-Random [-SetSeed <Int32>] [[-Maximum] <Object>] [-Minimum <Object>] [-InformationAction <ActionPreference>]
[-InformationVariable <String>] [<CommonParameters>]
```powershell
Get-Random [[-Maximum] <Object>] [-SetSeed <Int32>] [-Minimum <Object>]
[<CommonParameters>]
```

### RandomListItemParameterSet
```
Get-Random [-SetSeed <Int32>] [-InputObject] <Object[]> [-Count <Int32>]
[-InformationAction <ActionPreference>] [-InformationVariable <String>] [<CommonParameters>]
```powershell
Get-Random [-InputObject] <Object[]> [-SetSeed <Int32>] [-Count <Int32>]
[<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -188,7 +188,7 @@ PS C:\> Get-Random 10001
```

This command gets a random integer less than 10001.
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.
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.

### Example 14: Get random 64-bit numbers
```
Expand Down Expand Up @@ -224,33 +224,6 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -InformationAction
```yaml
Type: ActionPreference
Parameter Sets: (All)
Aliases: infa
Accepted values: SilentlyContinue, Stop, Continue, Inquire, Ignore, Suspend

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -InformationVariable
```yaml
Type: String
Parameter Sets: (All)
Aliases: iv

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -InputObject
Specifies a collection of objects.
**Get-Random** gets randomly selected objects in random order from the collection.
Expand All @@ -263,7 +236,7 @@ Parameter Sets: RandomListItemParameterSet
Aliases:

Required: True
Position: 1
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Expand Down Expand Up @@ -291,7 +264,7 @@ Parameter Sets: RandomNumberParameterSet
Aliases:

Required: False
Position: 1
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Expand Down