Hi,
The bat script runs as expected on my machine so I suppose it's a problem with the PowerShell script.
Can you post the the PowerShell script? Do you see the error message if you run the PowerShell script from Windows PowerShell?
Also see if this works.
@ECHO OFF
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0\MyPowerShellScript.ps1' -Param1Name 'Param 1 Value' -Param2Name 'Param 2 Value'"
Best Regards,
Ian Xue
If the Answer is helpful, please click "Accept Answer" and upvote it.