PowerShell: True, False (boolean)

By Xah Lee. Date: . Last updated: .

True and False Representation

PowerShell $true $false

Dotnet True False

True Values

False Values

Force to Boolean (Casting)

$x = 3
[bool] $x
# True

$x = ""
[bool] $x
# False

PowerShell. Boolean Related