3 ms·
RTFM - if you don't specify type, it is infered. [bool] $x = "true" MetadataError: Cannot convert value "System.String" to type "System.Boolean". Boole
by majkinetor 6y ago
RTFM - if you don't specify type, it is infered.
[bool] $x = "true"
MetadataError: Cannot convert value "System.String" to type "System.Boolean". Boolean parameters accept only Boolean values and numbers, such as $True, $False, 1 or 0.