Usage
Get-HWND -Name 'npad'
Get-HWND -ProcessId 1234Parameters
-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.
Note
'npad' matches Notepad because the characters occur in order.