I have a powershell script were I need to execute first to invoke .cmd file to complete a network download and then I need to process on that downloaded data. Below is my command
Runas /savecred /profile /user:myuser "cmd /c C:\Users\myuser\myfile.cmd"
ECHO $Hello
From the above command, myfile.cmd downloads a file and then I need to process it. Here powershell does not waits for the file to download and starts executing below commands. How can I make it wait for the file to download?