Error EC8F0401: The command file (before data capture) failed to execute.
Error E0BB014A: Command
This issue will occur if a PowerShell command starts with just "powershell".
Each PowerShell command in the batch file needs to begin with a start /wait command as well as the full path to the powershell.exe. For each line of the batch file which begins with powershell, replace powershell with the following:
start "PowerShell" /wait %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe
Note: The above command should be altered to include the correct path to the powershell.exe if it is in a different location.