# ========================================================= # MAX Windows Toolkit - 创建系统还原点 # ========================================================= $Common = "C:\Setup\windows\lib\common.ps1" if (Test-Path $Common) { . $Common } Show-AdminWarn Write-Header "创建系统还原点" try { Write-Info "启用 C 盘系统还原..." Enable-ComputerRestore -Drive "C:\" -ErrorAction SilentlyContinue $RestorePointName = "MAX 还原点 - $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')" Write-Info "正在创建还原点..." Write-Muted "名称: $RestorePointName" Checkpoint-Computer -Description $RestorePointName -RestorePointType "MODIFY_SETTINGS" Write-Line Write-OK "系统还原点已创建" } catch { Write-Err "创建还原点失败" Write-Muted $_.Exception.Message } Write-Line Write-OK "系统还原点执行完成" Pause-Max