Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2562

Windows batch and PowerShell passing variables issue.

$
0
0
If I use variable instead of number as build version value, it is not working.

Any 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:
-------
The variable '$buildVersionMain' cannot be retrieved because it has not been set.

Viewing all articles
Browse latest Browse all 2562

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>