07-23-2023, 09:38 AM
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.
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.