I have a test.ps1 script as follows:
param(
$a = "ValueA"
)
now if you call it from the command line from my msbuild project file as follows
. \ test.ps1 -a "". \ test.ps1 -a $ null
it does not set the default value "ValueA" to $ a. I would like to set the default "Value" to $ a, even if the user passes zero or empty values to it. I know I can use if construct, but I was wondering if there is a faster way to achieve this. Any idea?
source
share