如何查看自己机器上的共享文件正在被访问,可以使用CMD中的命令openfiles. openfiles命令需要以管理员权限才能运行,否则会提示:ERROR: Logged-on user does not have administrative privilege.
如果当前没有共享文件被访问:
PS C:\windows\system32> openfiles ERROR: Unable to retrieve data. The system could not find the environment option that was entered. Files opened remotely via local share points: --------------------------------------------- INFO: No shared open files found.
如果有共享文件正在被访问:
PS C:\windows\system32> openfiles ERROR: Unable to retrieve data. The system could not find the environment option that was entered. Files opened remotely via local share points: --------------------------------------------- ID Accessed By Type Open File (Path\executable) ======== ==================== ========== ===================================== 26843566 Mosser Windows D:\..\Testcode\Tools\AMSConsole\ 26843569 Mosser Windows D:\..\Testcode\Tools\AMSConsole\
通过gridview查看
openfiles /Query /S computerName /FO CSV /V | Out-GridView
本文链接: https://www.pstips.net/powershell-view-opened-files.html
请尊重原作者和编辑的辛勤劳动,欢迎转载,并注明出处!
请尊重原作者和编辑的辛勤劳动,欢迎转载,并注明出处!