diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Get-Random.md b/reference/5.1/Microsoft.PowerShell.Utility/Get-Random.md index fd200d73d44..15366823e80 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Get-Random.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Get-Random.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility -ms.date: 06/12/2023 +ms.date: 06/25/2023 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/get-random?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 title: Get-Random @@ -241,10 +241,13 @@ Name Count ### -Count -Specifies the number of random objects or numbers to return. The default is 1. +Specifies the number of random objects to return. The default is 1. -When used with `InputObject`, if the value of **Count** exceeds the number of objects in the -collection, `Get-Random` returns all the objects in random order. +When used with `InputObject` containing a collection: + +- Each randomly selected item is returned only once. +- If the value of **Count** exceeds the number of objects in the collection, all objects in the + collection are returned in random order. ```yaml Type: System.Int32 @@ -380,9 +383,6 @@ submitted collection. ## NOTES -By default, `Get-Random` generates cryptographically secure randomness using the -[RandomNumberGenerator](/dotnet/api/system.security.cryptography.randomnumbergenerator) class. - `Get-Random` doesn't always return the same data type as the input value. The following table shows the output type for each of the numeric input types. diff --git a/reference/7.2/Microsoft.PowerShell.Utility/Get-Random.md b/reference/7.2/Microsoft.PowerShell.Utility/Get-Random.md index a3c17366725..cd085754d8b 100644 --- a/reference/7.2/Microsoft.PowerShell.Utility/Get-Random.md +++ b/reference/7.2/Microsoft.PowerShell.Utility/Get-Random.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility -ms.date: 06/12/2023 +ms.date: 06/25/2023 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/get-random?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 title: Get-Random @@ -270,10 +270,13 @@ and `$null` returns to a PowerShell prompt. ### -Count -Specifies the number of random objects or numbers to return. The default is 1. +Specifies the number of random objects to return. The default is 1. -When used with `InputObject`, if the value of **Count** exceeds the number of objects in the -collection, `Get-Random` returns all the objects in random order. +When used with `InputObject` containing a collection: + +- Each randomly selected item is returned only once. +- If the value of **Count** exceeds the number of objects in the collection, all objects in the + collection are returned in random order. ```yaml Type: System.Int32 @@ -428,9 +431,6 @@ submitted collection. ## NOTES -By default, `Get-Random` generates cryptographically secure randomness using the -[RandomNumberGenerator](/dotnet/api/system.security.cryptography.randomnumbergenerator) class. - `Get-Random` doesn't always return the same data type as the input value. The following table shows the output type for each of the numeric input types. diff --git a/reference/7.3/Microsoft.PowerShell.Utility/Get-Random.md b/reference/7.3/Microsoft.PowerShell.Utility/Get-Random.md index 90f502bb0ff..6352e9f6f9f 100644 --- a/reference/7.3/Microsoft.PowerShell.Utility/Get-Random.md +++ b/reference/7.3/Microsoft.PowerShell.Utility/Get-Random.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility -ms.date: 06/12/2023 +ms.date: 06/25/2023 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/get-random?view=powershell-7.3&WT.mc_id=ps-gethelp schema: 2.0.0 title: Get-Random @@ -270,10 +270,13 @@ and `$null` returns to a PowerShell prompt. ### -Count -Specifies the number of random objects or numbers to return. The default is 1. +Specifies the number of random objects to return. The default is 1. -When used with `InputObject`, if the value of **Count** exceeds the number of objects in the -collection, `Get-Random` returns all the objects in random order. +When used with `InputObject` containing a collection: + +- Each randomly selected item is returned only once. +- If the value of **Count** exceeds the number of objects in the collection, all objects in the + collection are returned in random order. ```yaml Type: System.Int32 @@ -428,9 +431,6 @@ submitted collection. ## NOTES -By default, `Get-Random` generates cryptographically secure randomness using the -[RandomNumberGenerator](/dotnet/api/system.security.cryptography.randomnumbergenerator) class. - `Get-Random` doesn't always return the same data type as the input value. The following table shows the output type for each of the numeric input types. diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Get-Random.md b/reference/7.4/Microsoft.PowerShell.Utility/Get-Random.md index 74a19c4c037..6f0d585980c 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Get-Random.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Get-Random.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility -ms.date: 06/12/2023 +ms.date: 06/25/2023 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/get-random?view=powershell-7.4&WT.mc_id=ps-gethelp schema: 2.0.0 title: Get-Random @@ -272,10 +272,13 @@ and `$null` returns to a PowerShell prompt. ### -Count -Specifies the number of random objects or numbers to return. The default is 1. +Specifies the number of random objects to return. The default is 1. -When used with `InputObject`, if the value of **Count** exceeds the number of objects in the -collection, `Get-Random` returns all the objects in random order. +When used with `InputObject` containing a collection: + +- Each randomly selected item is returned only once. +- If the value of **Count** exceeds the number of objects in the collection, all objects in the + collection are returned in random order. ```yaml Type: System.Int32 diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Get-SecureRandom.md b/reference/7.4/Microsoft.PowerShell.Utility/Get-SecureRandom.md index 555706ea811..cf72b0559b5 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Get-SecureRandom.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Get-SecureRandom.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility -ms.date: 05/03/2023 +ms.date: 06/25/2023 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/get-securerandom?view=powershell-7.4&WT.mc_id=ps-gethelp schema: 2.0.0 title: Get-SecureRandom @@ -212,10 +212,13 @@ line and `$null` returns to a PowerShell prompt. ### -Count -Specifies the number of random objects or numbers to return. The default is 1. +Specifies the number of random objects to return. The default is 1. -When used with `InputObject`, if the value of **Count** exceeds the number of objects in the -collection, `Get-SecureRandom` returns all the objects in random order. +When used with `InputObject` containing a collection: + +- Each randomly selected item is returned only once. +- If the value of **Count** exceeds the number of objects in the collection, all objects in the + collection are returned in random order. ```yaml Type: System.Int32