true
という文字列を代入
$a = "true"
$a.GetType()
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True String System.Object
[System.Convert]::ToBoolean($a)
でBooloan型へ変換
$TrueorFalse = [System.Convert]::ToBoolean($a)
$TrueorFalse.GetType()
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True Boolean System.ValueType