Skip to content

Instantly share code, notes, and snippets.

@jrotello
Created October 9, 2012 13:59
Show Gist options
  • Save jrotello/3858994 to your computer and use it in GitHub Desktop.
Save jrotello/3858994 to your computer and use it in GitHub Desktop.
Select "volunteers" from a list or file.
function Get-Volunteers {
[CmdletBinding()]
param(
[int]$count = 1,
[array]$values = @(),
[string]$file = ""
)
if ($file -ne "") {
Get-Content $file | % { $values += $_ }
}
Write-Verbose "Volunteer Pool"
Write-Verbose "========================="
$values | Write-Verbose
$values | Get-Random -Count $count
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment