# List wwwroot layout for cleanup decision $ErrorActionPreference = 'Continue' Write-Output '=== tree tops ===' @( 'E:\wwwroot', 'E:\wwwroot\agent', 'E:\wwwroot\admin', 'E:\wwwroot\inquiry-new', 'E:\wwwroot\ops', 'E:\wwwroot\agent\current', 'E:\wwwroot\admin\current' ) | ForEach-Object { "$_ => $(Test-Path $_)" } Write-Output '=== agent releases ===' if (Test-Path 'E:\wwwroot\agent\releases') { Get-ChildItem 'E:\wwwroot\agent\releases' | ForEach-Object { $_.Name + ' ' + $_.LastWriteTime } } else { 'missing agent/releases' } Write-Output '=== admin releases ===' if (Test-Path 'E:\wwwroot\admin\releases') { Get-ChildItem 'E:\wwwroot\admin\releases' | ForEach-Object { $_.Name + ' ' + $_.LastWriteTime } } else { 'missing admin/releases' } Write-Output '=== current targets ===' foreach ($p in @('E:\wwwroot\agent\current','E:\wwwroot\admin\current')) { if (Test-Path $p) { $i = Get-Item $p -Force "link=$p type=$($i.LinkType) target=$($i.Target)" } else { "missing $p" } } Write-Output '=== pointer ===' if (Test-Path 'E:\wwwroot\ops\active-release.json') { Get-Content 'E:\wwwroot\ops\active-release.json' -Raw } Write-Output '=== ports ===' foreach ($x in 8080,8810,8813,8180,8910,8913) { $c = Get-NetTCPConnection -LocalPort $x -State Listen -EA SilentlyContinue | Select-Object -First 1 if ($c) { "$x LISTEN pid=$($c.OwningProcess)" } else { "$x down" } } Write-Output 'LIST_DONE'