I’m trying to make my batch script (Test.bat) wait until the Powershell script (TheScriptToBeExecuted.ps1) it calls finishes. Here is the content of the batch script:
call powershell.exe -executionpolicy remotesigned -File TheScriptToBeExecuted.ps1 exit /b
I’ve tried using
START /wait but it didn’t help. When I double click on the Test.bat file, it seems to be waiting, yet when it’s called from another script, it doesn’t wait. How can I make my batch script wait for the Powershell script to finish?