Created
October 9, 2012 13:59
-
-
Save jrotello/3858994 to your computer and use it in GitHub Desktop.
Select "volunteers" from a list or file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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