diff --git a/staging/cse/windows/debug/collect-windows-logs.ps1 b/staging/cse/windows/debug/collect-windows-logs.ps1 index 54d20254ea1..7d147606387 100644 --- a/staging/cse/windows/debug/collect-windows-logs.ps1 +++ b/staging/cse/windows/debug/collect-windows-logs.ps1 @@ -280,6 +280,9 @@ else { $res = Get-Command shimdiag.exe -ErrorAction SilentlyContinue if ($res) { Write-Host "Collecting logs of runhcs shim diagnostic tool" + shimdiag.exe list --pids > "$ENV:TEMP\$timeStamp-shimdiag-list-with-pids.txt" + $paths += "$ENV:TEMP\$timeStamp-shimdiag-list-with-pids.txt" + $tempShimdiagFile = Join-Path ([System.IO.Path]::GetTempPath()) ("shimdiag.txt") $shimdiagList = shimdiag.exe list Set-Content -Path $tempShimdiagFile -Value $shimdiagList @@ -295,6 +298,17 @@ else { Write-Host "shimdiag.exe command not available" } +# run hcsdiag list +$res = Get-Command hcsdiag.exe -ErrorAction SilentlyContinue +if ($res) { + Write-Host "Collecting logs from hcsdiag tool" + hcsdiag.exe list > "$ENV:TEMP\$timeStamp-hcsdiag-list.txt" + $paths += "$ENV:TEMP\$timeStamp-hcsdiag-list.txt" +} +else { + Write-Host "hcsdiag.exe command not available" +} + # log containerd info $res = Get-Command containerd.exe -ErrorAction SilentlyContinue if ($res) {