Windows 11 Cascade Windows: possible with e.g. AutoHotkey, not with VBScript or PowerShell

Stijn Bousard 1 Reputation point
2021-10-22T10:45:01.947+00:00

In Windows 10, I was able to use "Cascade Windows" with a simple .vbs script:
set objShell = CreateObject("shell.application") call objShell.CascadeWindows()

The same is possible with PowerShell:
$ShellExp = New-Object -ComObject Shell.Application $ShellExp.CascadeWindows()

However, in Windows 11, this is no longer possible. No error is thrown, nothing happens. Nevertheless, the method is present in Windows 11. Issue the following PowerShell command:
New-Object -ComObject "Shell.Application" | gm | select Name, MemberType

And using e.g. AutoHotkey, I am able to "Cascade Windows" using the following script/command:
DllCall( "CascadeWindows", uInt,0, Int,4, Int,0, Int,0, Int,0 )

I was wondering if there is a way to restore a functioning "Cascade Windows" using VBScript (or PowerShell)?

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,150 questions
0 comments No comments
{count} votes