Filter the process objects returned by PowerShell’s Get-Process to show entries whose MainWindowTitle is not empty:
| |
This displays the main-window title for each process. It does not enumerate every window owned by a process or every window on the desktop. Processes without a main window, and processes whose title is empty, are omitted. The output can also change as processes start or exit.
Window titles can include open document names or other personal information. Review the output before saving it to a log or sharing it.
See Microsoft’s documentation for Get-Process and .NET Process.MainWindowTitle.
