Is there a way to maximize all windows on Windows 10, using a script or hotkey combination?

There is a previous question for Windows 7, but Shift+Win+M doesn't work on Windows 10. Neither does the Task Manager solution: Maximize All on a PC

How would I call it every time I change focus? Or possibly just maximize the foreground window each time (basically like a mobile OS). Are there any 'window' switchers that have this option?

For the curious, I need this because every time my larger monitor sleeps, it resets the window sizes.

  • Shift+Win+M works for me on Windows 10 1709.
    – fpmurphy
    Sep 15, 2018 at 4:23
  • Doesn't work on 1803 for at least windows already minimized. Sep 15, 2018 at 5:30

4 Answers 4


Here's a PowerShell script that uses Get-Process to get all the MainWindowTitle Property values and uses AppActivate to activate each window title. It then uses SendKeys to emulate the Alt+Space+x keyboard presses to maximize each of those windows.

(Get-Process | Where {$_.MainWindowTitle}).MainWindowTitle | % {
    $wshell = (New-Object -ComObject wscript.shell)
    sleep 1
    $wshell.SendKeys("% x")
    sleep 1
} | Out-Null

Further Resources

  • I also found this post: community.spiceworks.com/topic/… and it has a PS function named Set-WindowStyle but I could not get it to work after testing and trying different variations and adjustments but once that failed after a few tries, I looked for another way to do it using some of those same concepts, tested, etc. and came up with the answer I provided in case this ever helps anyone there's not much logic to it so it's quite simple. Sep 15, 2018 at 5:40

This AutoHotKey script works pretty well for maximizing after Alt+Tab switching.

   sleep, 1000
   WinMaximize, A

This works using AutoHotKey. Just close any windows you don't want maximised first, or exclude them using ExcludeTitle or ExcludeText paramaeters. https://autohotkey.com/docs/commands/WinMaximize.htm

WinGet, MyCount, Count
GroupAdd, AllWindows
Loop, %MyCount%    {
  WinMaximize ahk_group AllWindows
  Send !{tab}

This works to EMULATE a maximised window (make it really big and fill the screen):

Open a program with its window non-maximised (if it's already maximised, use the keyboard shortcut Alt+Space, R to 'restore' it to its smaller size). DON'T maximise it, but use your pointer to drag the corners of the window to the corners of your screen. Then hold Alt while clicking the red cross in the top-right-hand corner. When the program is re-opened, though not technically 'Maximized', it should be nice and big and fill your screen in an identical manner, depending on how carefully you dragged those corners.

While the holding-Alt-trick attracted me, closing the window in the normal way also saves its size and position after these have been changed... sometimes.

Some users report that this is a temporary fix that works a few times, and then mysteriously stops working. For the meantime, I'm happy enough that it's got Task Manager opening maximised after several other methods (I didn't try any of the scripts) didn't do the trick.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .