Windows batch and PowerShell passing variables issue.
if use variable instead of number build version value, not working.
suggestion?
batch script:
------------
set buildversion = 2.1
cd c:\scripts
powershell.exe -file deploy-axsis.ps1 %buildversion% (not working)
powershell.exe -file deploy-axsis.ps1 2.1 ( working)
ps script:
----------
$buildversionmain=$args[0]
error:
-------
variable '$buildversionmain' cannot retrieved because has not been set.
suggestion?
batch script:
------------
set buildversion = 2.1
cd c:\scripts
powershell.exe -file deploy-axsis.ps1 %buildversion% (not working)
powershell.exe -file deploy-axsis.ps1 2.1 ( working)
ps script:
----------
$buildversionmain=$args[0]
error:
-------
variable '$buildversionmain' cannot retrieved because has not been set.
you cannot have spaces between variable name , equal sign, spaces after equal sign become part of variable value.
set buildversion=2.1
best regards
claus codam
consultant, developer
coretech - blog
Windows Server > Windows PowerShell
Comments
Post a Comment