≡ Menu

How to open applications from PowerShell in a maximized window

This I learned today through powershell.com. If you want to open a notepad or iexplore, or someother application in maximized or minized or restored mode, you can do that easily with Powershell.

To open a process in maximized mode, use this.

Start-Process notepad -WindowStyle maximized

To open a process in minimized mode, use this

Start-Process notepad -WindowStyle minimised

To open a process in restored mode

Start-Process notepad -WindowStyle normal

To open a process in hidden mode

Start-Process notepad -WindowStyle hidden

You can query and kill all these processes at one shot by using below command

Get-Process -Name Notepad | Stop-Process

Hope it is useful to you.

Comments on this entry are closed.

  • Matheus Mendes August 22, 2018, 9:20 pm

    The first command is wrong: “-WindowStype” instead of “-WindowStyle”. Anyway, thank you so much for the tutorial, it helped a lot!

    • Wintel Rocks August 28, 2018, 10:14 pm

      Thanks for highlighting it. It is corrected now.

  • Don't want to mention October 29, 2019, 5:44 pm

    “Running the following line results in an error: “Start-Process notepad -WindowStyle minimised”

    “minimised” should be “minimized”