<# .SYNOPSIS Check which pages exist under the configured root page .USAGE powershell -ExecutionPolicy Bypass -File scripts/confluence-check.ps1 #> . "$PSScriptRoot/../config.ps1" . "$PSScriptRoot/lib/confluence-api.ps1" Write-Host "=== Confluence Page Check ===" -ForegroundColor Cyan Write-Host "Root: $RootPageId | Space: $SpaceKey" Write-Host "" $Children = Get-ChildPages -PageId $RootPageId Write-Host "Found $($Children.Count) child pages:" -ForegroundColor Green Write-Host "" Write-Host ("{0,-10} {1,-60} {2}" -f "ID", "Title", "Version") Write-Host ("-" * 80) $Children | Sort-Object { $_.title } | ForEach-Object { $ver = if ($_.version) { $_.version.number } else { "?" } Write-Host ("{0,-10} {1,-60} v{2}" -f $_.id, $_.title, $ver) }