I have a batch file that starts a PowerShell script.
Batch file:
START Powershell -executionpolicy RemoteSigned -noexit -file "MyScript.ps1"
MyScript.ps1 :
Write-Output "Hello World!"
It works fine, with one exception. The appearance of the window is like the old cmd.exe (black background) and not the PowerShell (blue background).
How can I get the true PowerShell window, if I start it from a batch file?
Thanks.
start powershell -noexit -executionpolicy unrestricted -file "PowerShell script.ps1"then you need it to actually open in PowerShell, not Command Prompt, so you can see the full history of the script.