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

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Windows/...', 1758207105, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Windows/PowerShell/modules/personal/filesystem/get-openFileProcess(50): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78