Files
claudetools/clients/cascades-tucson/docs/migration/scripts/phase4-archive-synology.ps1
Howard Enos 8d975c1b44 import: ingested 160 files from C:\Users\howar\Clients
Howard's personal MSP client documentation folder imported into shared
ClaudeTools repo via /import command. Scope:

Clients (structured MSP docs under clients/<name>/docs/):
- anaise       (NEW)  - 13 files
- cascades-tucson     - 47 files merged (existing had only reports/)
- dataforth           - 18 files merged (alongside incident reports)
- instrumental-music-center - 14 files merged
- khalsa       (NEW)  - 22 files, multi-site (camden, river)
- kittle       (NEW)  - 16 files incl. fix-pdf-preview, gpo-intranet-zone
- lens-auto-brokerage (NEW) - 3 files (name matches SOPS vault)
- _client_template    - 13-file scaffold for new clients

MSP tooling (projects/msp-tools/):
- msp-audit-scripts/ - server_audit.ps1, workstation_audit.ps1, README
- utilities/         - clean_printer_ports, win11_upgrade,
                       screenconnect-toolbox-commands

Credential handling:
- Extracted 1 inline password (Anaise DESKTOP-O8GF4SD / david)
  to SOPS vault: clients/anaise/desktop-o8gf4sd.sops.yaml
- Redacted overview.md with vault reference pattern
- Scanned all 160 files for keys/tokens/connection strings -
  no other credentials found

Skipped:
- Cascades/.claude/settings.local.json (per-machine config)
- Source-root CLAUDE.md (personal, claudetools has its own)
- scripts/server_audit.ps1 and workstation_audit.ps1 at source root
  (identical duplicates of msp-audit-scripts versions)

Memory updates:
- reference_client_docs_structure.md (layout, conventions, active list)
- reference_msp_audit_scripts.md (locations, ScreenConnect 80-char rule)

Session log: session-logs/2026-04-16-howard-client-docs-import.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-16 19:43:58 -07:00

72 lines
2.5 KiB
PowerShell

#Requires -RunAsAdministrator
<#
.SYNOPSIS
Phase 4.5: Archive the SynologyDrive folder on CS-SERVER.
.DESCRIPTION
Renames the SynologyDrive share folder to indicate it's archived and
should be deleted after 30 days. Run ONLY after all users are confirmed
working with mapped drives to CS-SERVER shares.
#>
$SourcePath = "D:\Shares\SynologyDrive"
$ArchiveName = "_SynologyDrive_ARCHIVE_DeleteAfter30Days"
$ArchivePath = "D:\Shares\$ArchiveName"
$DeleteDate = (Get-Date).AddDays(30).ToString("yyyy-MM-dd")
Write-Host "=== Phase 4.5: Archive SynologyDrive ===" -ForegroundColor Cyan
Write-Host ""
if (-not (Test-Path $SourcePath)) {
Write-Host "[SKIP] $SourcePath does not exist (already archived?)" -ForegroundColor Yellow
if (Test-Path $ArchivePath) {
Write-Host " Archive exists at: $ArchivePath" -ForegroundColor DarkGray
}
exit 0
}
# Check if there's an SMB share pointing to SynologyDrive
$share = Get-SmbShare | Where-Object { $_.Path -eq $SourcePath } -ErrorAction SilentlyContinue
if ($share) {
Write-Host "Removing SMB share: $($share.Name)" -ForegroundColor Yellow
Remove-SmbShare -Name $share.Name -Force
Write-Host " [OK] SMB share removed" -ForegroundColor Green
}
# Get size info
$stats = Get-ChildItem $SourcePath -Recurse -File -ErrorAction SilentlyContinue
$sizeGB = [math]::Round(($stats | Measure-Object Length -Sum).Sum / 1GB, 2)
Write-Host ""
Write-Host "SynologyDrive stats:" -ForegroundColor Cyan
Write-Host " Files: $($stats.Count)" -ForegroundColor Cyan
Write-Host " Size: $sizeGB GB" -ForegroundColor Cyan
Write-Host ""
# Rename
Write-Host "Archiving..." -ForegroundColor Yellow
try {
Rename-Item $SourcePath $ArchiveName
Write-Host "[OK] Renamed to: $ArchivePath" -ForegroundColor Green
Write-Host ""
Write-Host "IMPORTANT:" -ForegroundColor Yellow
Write-Host " Safe to delete after: $DeleteDate" -ForegroundColor Yellow
Write-Host " Set a calendar reminder!" -ForegroundColor Yellow
# Create a readme in the archive
@"
THIS FOLDER IS ARCHIVED
========================
Archived on: $(Get-Date -Format "yyyy-MM-dd HH:mm")
Safe to delete after: $DeleteDate
Reason: Migrated to CS-SERVER mapped drives (Phase 4 of network migration)
If you need to restore:
Rename-Item "$ArchivePath" "SynologyDrive"
"@ | Out-File "$ArchivePath\_ARCHIVE_README.txt"
}
catch {
Write-Host "[ERROR] Failed to archive: $_" -ForegroundColor Red
}
Write-Host "`n=== Archive Complete ===" -ForegroundColor Cyan