Files
claudetools/projects/msp-tools/utilities/win11_upgrade.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

75 lines
2.2 KiB
PowerShell

# ================================
# Fleet Windows 11 Upgrade Script
# ================================
$logFile = "C:\Temp\Win11Upgrade.log"
$dir = "C:\Temp"
New-Item -ItemType Directory -Path $dir -Force | Out-Null
function Write-Log {
param ([string]$msg)
$time = (Get-Date).ToString("yyyy-MM-dd HH:mm:ss")
"$time - $msg" | Out-File -FilePath $logFile -Append -Encoding utf8
Write-Host $msg
}
Write-Log "===== Starting Upgrade Script ====="
# Get OS info (fast)
$os = Get-CimInstance Win32_OperatingSystem
$build = [int]$os.BuildNumber
Write-Log "OS: $($os.Caption)"
Write-Log "Build: $build"
# Check if upgrade is needed
$targetBuild = 26000
if ($os.Caption -like "*Windows 11*" -and $build -ge $targetBuild) {
Write-Log "Already on latest Windows 11. Exiting."
exit 0
}
Write-Log "Upgrade required. Proceeding..."
# Enable unsupported hardware bypass (safe if not needed)
Write-Log "Setting compatibility bypass registry key"
reg add HKLM\SYSTEM\Setup\MoSetup /v AllowUpgradesWithUnsupportedTPMOrCPU /t REG_DWORD /d 1 /f | Out-Null
# Download Installation Assistant
$url = "https://go.microsoft.com/fwlink/?linkid=2171764"
$file = "$dir\Win11Upgrade.exe"
Write-Log "Downloading Windows 11 Installation Assistant..."
try {
Invoke-WebRequest $url -OutFile $file -UseBasicParsing -ErrorAction Stop
} catch {
Write-Log "Download failed: $($_.Exception.Message)"
exit 1
}
if (!(Test-Path $file)) {
Write-Log "Download file not found. Exiting."
exit 1
}
Write-Log "Download complete"
# Kill any previous upgrade processes
Get-Process -ErrorAction SilentlyContinue |
Where-Object { $_.Name -like "*Windows10UpgraderApp*" } |
Stop-Process -Force -ErrorAction SilentlyContinue
# Run upgrade silently
Write-Log "Starting upgrade process (this will take 30-60+ minutes)..."
$args = "/quietinstall /skipeula /auto upgrade /copylogs $dir"
$proc = Start-Process $file -ArgumentList $args -Wait -PassThru
Write-Log "Upgrade process exited with code: $($proc.ExitCode)"
if ($proc.ExitCode -eq 0) {
Write-Log "Upgrade succeeded. Machine will reboot automatically."
} else {
Write-Log "Upgrade may have failed. Check $dir for logs."
}
Write-Log "===== Script Complete ====="