项目作者: ironmansoftware

项目描述 :
A PowerShell module for finding open files.
高级语言: C#
项目地址: git://github.com/ironmansoftware/findopenfiles.git
创建时间: 2020-05-31T14:39:52Z
项目社区:https://github.com/ironmansoftware/findopenfiles

开源协议:MIT License

下载


Find-OpenFile by Ironman Software

A PowerShell module for finding open files.


Installation

  1. Install-Module FindOpenFile

Usage

Find all files in use.

  1. PS C:\Users\adamr> Find-OpenFile
  2. ProcessId : 7936
  3. Handle : 64
  4. GrantedAccess : 1048608
  5. RawType : 37
  6. Flags : 0
  7. Name : \Device\HarddiskVolume3\Windows\System32\DriverStore\FileRepository\FN8DAD~1.INF\driver
  8. TypeString : File
  9. Type : File
  10. ProcessId : 7936
  11. Handle : 112
  12. GrantedAccess : 1048608
  13. RawType : 37
  14. Flags : 0
  15. Name : \Device\HarddiskVolume3\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.190
  16. 41.1_none_b555e41d4684ddec
  17. TypeString : File
  18. Type : File

Find open files based on process

  1. PS C:\Users\adamr> Get-Process pwsh | Find-OpenFile
  2. ProcessId : 22160
  3. Handle : 64
  4. GrantedAccess : 1048608
  5. RawType : 37
  6. Flags : 0
  7. Name : \Device\HarddiskVolume3\Windows\SysWOW64
  8. TypeString : File
  9. Type : File
  10. ProcessId : 22160
  11. Handle : 964
  12. GrantedAccess : 1048577
  13. RawType : 37
  14. Flags : 0
  15. Name : \Device\HarddiskVolume3\Windows\System32\en-US\winnlsres.dll.mui
  16. TypeString : File
  17. Type : File

Find process locking a file

  1. PS C:\Users\adamr> Find-OpenFile -FilePath C:\Windows\System32\en-US\KernelBase.dll.mui
  2. NPM(K) PM(M) WS(M) CPU(s) Id SI ProcessName
  3. ------ ----- ----- ------ -- -- -----------
  4. 115 226.44 176.13 0.00 1940 1 dwm
  5. 11 2.63 10.35 0.00 7792 1 DAX3API
  6. 26 11.29 37.09 35.92 5568 1 sihost
  7. 154 168.61 203.50 652.52 8340 1 explorer
  8. 27 12.43 8.03 66.62 9952 1 SettingSyncHost
  9. 36 40.49 90.16 19.86 9480 1 StartMenuExperienceHost
  10. 18 6.96 27.73 10.08 9712 1 RuntimeBroker
  11. 140 157.37 97.46 93.78 10356 1 SearchApp
  12. 36 44.05 50.38 33.58 10520 1 RuntimeBroker
  13. 103 212.27 52.13 79.25 11236 1 SkypeApp
  14. 29 10.79 6.42 35.92 8748 1 PowerToys
  15. 27 14.69 48.04 3.91 11624 1 LockApp

Source