I'm writing a powershell script which uses write-host
to output another powershell script. How can I write out a boolean parameter with the value $true (or $false) including the dollar sign:
param
(
[switch] $myParam = $true
)
Write-Host My Param is $myParam
I need this to output exactly
My Param is $True
But it outputs
My Param is True
You can escape a $ with a `:
Write-Host My Param is `$$myParam
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With