Script that outputs all DLLs used by exe

↘锁芯ラ 提交于 2019-12-08 11:48:27

问题


In cmd the line

tasklist /m /fi "imagename eq xxxxx.exe" > output.txt

will output the DLLs used by all processes to one file.

How can I separate the output to multiple txt files, each file contains the name of the process the the DLL used?


回答1:


This should get you what you want:

Get-Process |
    ForEach-Object {
        $procName = $_.Name
        Get-Process -InputObject $_ -Module -ErrorAction SilentlyContinue |
            Export-Csv ".\$procName.csv" -NoTypeInformation
    }


来源:https://stackoverflow.com/questions/50406523/script-that-outputs-all-dlls-used-by-exe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!