Creating a specific distribution of random numbers in Powershell
Since you tagged your question with Performance, my example is not totally idiomatic PowerShell.

You could build a lookup array with each number as many times as you have defined the probability for them.
Afterwards you can easily index into it using one or an array of random (index) numbers.
$propabilityDefinition = @{
    0 = 10
    1 = 11
    2 = 19
    3 = 12
    4 = 3
    5 = 10
    6 = 6
    7 = 7
    8 = 4
    9 = 18
}

# build a lookup array with each number as many times as defined as probability
$numberLookup = foreach ($entry in $propabilityDefinition.GetEnumerator()) { 
    # using foreach with Linq.Enumerable.Repeat is the fastest way I found so far
    [System.Linq.Enumerable]::Repeat($entry.Key, $entry.Value)
}

# get x random numbers within the scope of the array indexes. 
# with PS7+ we can also use the Count parameter of Get-Random, but don't use &quot;Get-Random&quot; within a loop as it hits the performance quite hard
#   PS7 variant: &quot;$randomIndex = (Get-Random -Minimum 0 -Maximum $numberLookup.Count -Count 1000)&quot;
# if you only want to get one random number, you can always use &quot;$randomIndex = Get-Random -Minimum 0 -Maximum $numberLookup.Count&quot;
$random = [System.Random]::new()
$randomIndex = foreach ($null in 0..10000) {
    $random.Next(0, $numberLookup.Count)
}


# we can use the entiry array of random numbers at once for the index operator
$numberLookup[$randomIndex] | Group-Object -NoElement | Sort-Object Count -Descending

Output:
Count Name
----- ----
 1896 2
 1821 9
 1194 3
 1141 1
  983 0
  979 5
  694 7
  596 6
  393 8
  304 4