Search notes:

PowerShell module filesystem: get-openFileProcess

On Windows, the function get-openFileProcess of the PowerShell module filesystem returns an array of System.Diagnostic.Process that specify the processes that have a given file opened.
PS:> rm .\some.dll
rm : Cannot remove item C:\…\some.dll: Access to the path 'C:\some.dll' is denied.
…
PS:> get-openFileProcess .\itext.io.dll | stop-process
PS:> rm .\some.dll
… OK …

See also

RstrtMgr.dll
This function was originally copied from Paul DiMaggio's Get-FileLockProcess function.
https://www.dima.to/blog/?p=220 has some managed and unmanaged code that seems to be able to find the Windows handle of a locked file and the use that handle to close the file.

Index