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

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

Viewing all articles
Browse latest Browse all 8967

Trending Articles