As the title says, any argument passed to a PowerShell script that starts with a '/' is replaced with True.
For a script
param (
[string]$wd = ""
)
echo $wd
And run with .\script.ps1 -wd "/etc/xyz"
, the output is True
instead of the expected /etc/xyz
. I was unable to find this behavior documented elsewhere, except for a similar issue in vbscript.
How can I get the string as-is?