且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

检查目录中的锁定文件并找到锁定应用程序

更新时间:2023-10-21 14:01:28

好吧,您需要使用 sysinternals 中的 handle.exe 来实现此目的.PowerShell MVP Adam Driscoll 编写了 sysinternals handle.exe 的 PowerShell 版本.您可以在以下位置检查:https://github.com/adamdriscoll/PoshInternals/blob/master/Handle.ps1

Well, You need to use handle.exe from sysinternals to achieve this. Adam Driscoll, a PowerShell MVP, wrote a PowerShell version of sysinternals handle.exe. You can check that at: https://github.com/adamdriscoll/PoshInternals/blob/master/Handle.ps1

此外,Keith Hill 在这里回答了一个类似的问题:用于检查锁定文件的应用程序的 PowerShell 脚本?

Also, there is a similar question answered here by Keith Hill: PowerShell script to check an application that's locking a file?