Skip to content

Commit

Permalink
Bypass the Restore Point limit (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
LeDragoX committed May 16, 2024
1 parent b82e3d2 commit a229321
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/scripts/Backup-System.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
Import-Module -DisableNameChecking "$PSScriptRoot\..\lib\debloat-helper\Set-ItemPropertyVerified.psm1"
Import-Module -DisableNameChecking "$PSScriptRoot\..\lib\Title-Templates.psm1"

$Script:TweakType = "Backup"

function New-RestorePoint() {
Write-Status -Types "+", $TweakType -Status "Breaking the Restore Point creation limit..."
Set-ItemPropertyVerified -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" -Name "SystemRestorePointCreationFrequency" -Type DWord -Value 0
Write-Status -Types "+", $TweakType -Status "Enabling system drive Restore Point..."
Enable-ComputerRestore -Drive "$env:SystemDrive\"
Checkpoint-Computer -Description "Win 10+ SDT Restore Point" -RestorePointType "MODIFY_SETTINGS"
Checkpoint-Computer -Description "Win 10 Restore Point" -RestorePointType "MODIFY_SETTINGS"
}

function Backup-HostsFile() {
Expand Down

0 comments on commit a229321

Please sign in to comment.