I have a powershell script as part of Azure DevOps pipeline. I also want to run it from windows command line. How can I set them before calling them in windows? Perhaps in a cmd file? Note - these are temporary for a single execution and don't want to set windows environment variables.
I am accessing the environment variables like this in the powershell script:
$tfsAccessToken = If ($serverMode) {$env:SYSTEM_ACCESSTOKEN} else {"somethingelse"}
$tfsBuildDefinitionId = If ($serverMode) {$env:SYSTEM_DEFINITIONID} else {2}
