I have a PowerShell script which creates a development environment and part of the process is to call a batch file to get source code. The problem is the batch file calls another batch file which has a pause at the end of it. This means the PowerShell script will not move on to the next task.
I can't remove the pause from the batch file as it is maintained by a different team.
I have created another batch file which gets around the pause issue:
@echo OFF
@echo Calling test.cmd...
@echo | call test.cmd
@echo Done.
Is there a way in PowerShell to do this so I don't need my batch file?
PowerShell script
Invoke-Expression -command "d:\relay.cmd"