Enable daily restore points
This commit is contained in:
parent
395d4c16db
commit
cdb505bf34
1 changed files with 9 additions and 0 deletions
|
|
@ -9,3 +9,12 @@ Add-MpPreference -ExclusionProcess "C:\ProgramData\TacticalRMM\tacticalagent*"
|
||||||
Add-MpPreference -ExclusionProcess "C:\Windows\Temp\is-*.tmp\tacticalagent*"
|
Add-MpPreference -ExclusionProcess "C:\Windows\Temp\is-*.tmp\tacticalagent*"
|
||||||
|
|
||||||
# --------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------
|
||||||
|
# Enable daily restore points
|
||||||
|
|
||||||
|
Enable-ComputerRestore -Drive 'C:'
|
||||||
|
|
||||||
|
Register-ScheduledTask -TaskName "Daily System Restore" -Action (New-ScheduledTaskAction -Execute "PowerShell.exe" -Argument "-ExecutionPolicy Bypass -Command `"Checkpoint-Computer -Description \"\"AUTOMATIC-$(Get-Date -Format 'yyyyMMddHHmmss')\"\" -RestorePointType \"\"MODIFY_SETTINGS\"\"`"") -Trigger (New-ScheduledTaskTrigger -Daily -At 9am) -Settings (New-ScheduledTaskSettingsSet -StartWhenAvailable -DontStopOnIdleEnd -RunOnlyIfNetworkAvailable) -Principal (New-ScheduledTaskPrincipal -UserId "NT AUTHORITY\SYSTEM" -LogonType ServiceAccount -RunLevel Highest)
|
||||||
|
|
||||||
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" -Name "SystemRestorePointFrequency" -Value 0 -Type DWORD -Force
|
||||||
|
|
||||||
|
# --------------------------------------------------------------------------------
|
||||||
Loading…
Add table
Add a link
Reference in a new issue