Short Description:
If pwsh/powershell is not running Maximized, re-open it Maximized
I have installed pwsh and wt, with pwsh as the default console in wt, and in some scripts, I want wt to run Maximized (wt doesn't run in Maximized by default. I don't want to set it).
In this .ps1, what code is needed to determine if wt is not running fullscreen/maximized, re-opening it in Maximized if it's not?
# demo.ps1#$IsMax =If (!$IsMax) { wt.exe -M PWSH $PSCommandPath; exit 0} pause