Quantcast
Channel: Active questions tagged windows - Super User
Viewing all articles
Browse latest Browse all 9162

Start Pwsh/ Powershell Maximized Thought Windows Terminal

$
0
0

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).

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'this is demo'pause
  • Such as in this batch script:
    @echo offif not "%1"=="max" (start /MAX cmd /c %~0 max& exit/b)pause

Viewing all articles
Browse latest Browse all 9162

Trending Articles