使用DebugDiag捕获转储的Powershell脚本?

时间:2017-03-24 00:54:49

标签: powershell

我正在开发一个脚本,可以使用调试diag为IIS appPOOL捕获转储。 我可以使用.VB脚本,但在这种情况下,业务需要PowerShell脚本。

我无法在互联网上找到任何相关帖子。 截至目前我甚至不知道,如果我们有一个用于调试diag的powershell模块。 有人能指出我正确的方向吗?

1 个答案:

答案 0 :(得分:0)

没有本地方法来捕获IIS App池转储。但是您可以将此批处理脚本转换为PS:

%windir%\system32\inetsrv\appcmd list wps /apppool.name:"Microsoft Team Foundation Server Application Pool" /text:WP.NAME > "%temp%\tfspid.txt"

:: ProcDump.exe (faster, reflects/clones the process for the dump to minimize the time the process is suspended (Windows 7 and higher only))

for /F %%a in (%temp%\tfspid.txt) do "%~dp0\procdump.exe" -accepteula -64 -ma -r %%a f:\dumps

pause

参考链接:APP Pool Dump

相关问题