oclaw/uds-auth/scripts/count-sessions.ps1
oliver ad0cc98b38 Make session visibility preference-driven and keep system-channel ACL separate.
Super/fallback can toggle view-all (default on); admin/user stay own-only while still seeing unowned system sessions. Add restore/prune helpers so empty-shell cleanup is explicit and recoverable.
2026-09-14 20:48:15 +08:00

14 lines
593 B
PowerShell

$live = 'C:\Users\zhout\.dsh\sessions'
$bak = 'C:\Users\zhout\.dsh\upgrade-backup-20260914-074633\sessions'
Write-Output 'LIVE:'
Get-ChildItem $live -Directory -ErrorAction SilentlyContinue | ForEach-Object {
$count = @(Get-ChildItem $_.FullName -Directory -ErrorAction SilentlyContinue).Count
Write-Output (" {0} => {1}" -f $_.Name, $count)
}
Write-Output 'BACKUP:'
Get-ChildItem $bak -Directory -ErrorAction SilentlyContinue | ForEach-Object {
$count = @(Get-ChildItem $_.FullName -Directory -ErrorAction SilentlyContinue).Count
Write-Output (" {0} => {1}" -f $_.Name, $count)
}