Skip to content

Instantly share code, notes, and snippets.

function ConvertTo-Boolean
{
param
(
[Parameter(Mandatory=$false,ValueFromPipeline=$true)][string] $value
)
switch ($value)
{
"y" { return $true; }
"yes" { return $true; }