Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用DebugDiag捕获转储的Powershell脚本?_Powershell - Fatal编程技术网

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

使用DebugDiag捕获转储的Powershell脚本?,powershell,Powershell,我正在编写一个脚本,该脚本可以使用debug diag为IIS应用程序池捕获转储。 我可以使用.VB脚本,但在这种情况下,业务需要powershell脚本 我在网上找不到任何相关的帖子。 到目前为止,我甚至不知道我们是否有用于调试诊断的powershell模块。 有人能给我指出正确的方向吗 没有捕获IIS应用程序池转储的本机方法。但您可以将此批处理脚本转换为PS: %windir%\system32\inetsrv\appcmd list wps /apppool.name:"Microsoft

我正在编写一个脚本,该脚本可以使用debug diag为IIS应用程序池捕获转储。 我可以使用.VB脚本,但在这种情况下,业务需要powershell脚本

我在网上找不到任何相关的帖子。 到目前为止,我甚至不知道我们是否有用于调试诊断的powershell模块。
有人能给我指出正确的方向吗

没有捕获IIS应用程序池转储的本机方法。但您可以将此批处理脚本转换为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

参考链接:

没有捕获IIS应用程序池转储的本机方法。但您可以将此批处理脚本转换为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
参考链接: