Skip to content

Get HWND

github-actions[bot] edited this page Nov 27, 2026 · 1 revision

Get-HWND

Matches characters in sequence across running process names and window titles, prioritizing exact and prefix process names.

Usage

. .\Get-HWND.ps1
Get-HWND -Name 'npad'
Get-HWND -ProcessId 1234

Parameters

  • -Name: Fuzzy app/process name or title.
  • -ProcessId: Exact process ID, alternative to -Name.

Returns

One or more IntPtr main-window handles; processes without a main window are omitted.

Notes

'npad' matches Notepad because the characters occur in order.

Source script · Documentation page

Clone this wiki locally