CreateRestorePoint.ps1 (548B)
1 Write-host "Would you like to create a restore point (Default is No)" -ForegroundColor Yellow 2 $Readhost = Read-Host "[Y/N]" 3 Switch ($ReadHost) { 4 Y { 5 Write-Host "Creating restore point..." -ForegroundColor Gray; 6 Write-host Checkpoint-Computer -Description "CYBERPOLICE-RestorePoint" -RestorePointType "MODIFY_SETTINGS"; 7 Write-Host "Restore point made!" -ForegroundColor Green 8 } 9 N { Write-Host "Restore point not created." -ForegroundColor Red } 10 Default { Write-Host "Restore point not created." -ForegroundColor Red } 11 } 12