Private/Set-MultiSelect.ps1
function Set-MultiSelect { param ( $POS, [array] $CurrentSelection ) if ($CurrentSelection -contains $POS){ $Result = $CurrentSelection | Where-Object { $_ -ne $POS } } else { $CurrentSelection += $POS $Result = $CurrentSelection } $Result } |