This sounds like a potentially useful feature. Although, I would have it work more like this:
- Returns $null if PID 400 does not exist
- Returns the name of PID 400 if it exists, ie notepad.exe
- Returns $null if a program called notepad.exe isn't running
- Returns the PID of the nth program called notepad.exe, or if n=0 returns total number of programs called notepad.exe
- Returns $null if the PID/program doesn't exist
- Returns the specified param data
* <param> could potentially be any column that is displayed in the windows task manager (view > select columns). ie handles, threads, username, memory, description, etc.