I'm banging my head against the wall to come up with a solution/tool to monitor process handles.
I know there's process explorer and handle from sysinternals tools but what I'm trying to achieve here is execute a given process via powershell/cmd, monitor the handles throughout the whole execution and keep track of all the handles that have been opened(even if they're close at some point)
I have thought about automating handle from sysinternals so it runs every X seconds but that would be, first of all too time/memory consuming and most likely could cause race conditions with the process from which the handles are being dumped(plus it also might miss handles if they're created and closed before it runs)
Any suggestions or ideas that I could go for?
To summarize: A tool that can register all the handles that a given process used from start to finish.
Thanks in advance!