How to start PowerShell in a new window from .bat and run a .ps1 without exiting the console?

Viewed 28528

I would like to have a .bat file that

  • opens a PowerShell console in a new window
  • and runs a .ps1 script
  • and does not exit and close the PowerShell console.

My batch file contains the following line:

start powershell.exe -Command "&'D:\MyToolkit\ToolKit.ps1'"

However, it closes the PowerShell after running the script.

Any advice? Thanks

2 Answers
Related