PowerShell
PowerShell
Generating Random Integer in Range
See more PRNG Examples
Demonstrates how to generate random integers in a specified range.Chilkat PowerShell Downloads
Add-Type -Path "C:\chilkat\ChilkatDotNet47-x64\ChilkatDotNet47.dll"
$success = $false
# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.
$success = $false
$fortuna = New-Object Chilkat.Prng
# Generate random integers between 12 and 24 inclusive
for ($i = 0; $i -le 100; $i++) {
$($fortuna.RandomInt(12,24))
}