running a PowerShell script with parameters from a batch script -


i working on batch script read in parameters , start powershell script, needs typed in parameters.

what have done far:

set /p arg1 = type in name  data:   set /p arg2 = type in directory of project:   set /p arg3 = type in programming language :   set /p arg4 = type in version metric data:   set thisscriptsdirectory=%~dp0 set powershellscriptpath=%thisscriptsdirectory%metrics.ps1  powershell -noprofile -executionpolicy bypass -command "& '%powershellscriptpath%' 'arg1' 'arg2' 'arg3' 'arg4'"; 

unfortunally powershell script doesn't accept parameters.

powershell -noprofile -executionpolicy bypass -file "%powershellscriptpath%" %arg1% %arg2% ....