I have a batch file that ask the user for a variable line set /p asset=. Im calling my powershell script like this
set /p asset=
SET ThisScripts
param($asset)
This has to be the very first line in the PowerShell script for it to work, else it will fail.