Reputation: 24572
I put this code into a .bat script to run a file:
powershell -NoProfile -ExecutionPolicy Bypass .\abc.ps1"
When the script finishes the window closes and I can't see the output. How can I make the window stay open?
Upvotes: 1
Views: 2212
Reputation: 47792
Depends on what you want left in the window. Do you want a command prompt? If so use:
cmd /k powershell -NoProfile -ExecutionPolicy Bypass .\abc.ps1
Do you want a powershell window?
powershell -NoExit -NoProfile -ExecutionPolicy Bypass .\abc.ps1
Upvotes: 1