Pass variable from batch to powershell

后端 未结 3 1381
北荒
北荒 2021-01-16 05:20

I have a batch file that ask the user for a variable line set /p asset=. Im calling my powershell script like this

SET ThisScripts

3条回答
  •  说谎
    说谎 (楼主)
    2021-01-16 06:08

    param($asset)
    

    This has to be the very first line in the PowerShell script for it to work, else it will fail.

提交回复
热议问题