I'm trying to pass parameters to a powershell script under windows and passing a path to the script (set to run as "source code"). I tried a lot of variations to get the path into the script, but everything I tried gave me a path of "null".
It looks like I should define an environment variable (which I did, called "fileURI"), then access it in the source code script as "%fileURI%" - but that doesn't work (null path):
$contents = get-content %fileURI% -Raw
[16:08:20][Step 3/7] + ~~~~~
[16:08:20][Step 3/7] + CategoryInfo : InvalidData: (:) [Get-Content], ParameterBindingValidationException
[16:08:20][Step 3/7] + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.GetContentC
[16:08:20][Step 3/7] ommand