mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-04-05 22:28:31 +00:00
23 lines
1.1 KiB
Markdown
23 lines
1.1 KiB
Markdown
---
|
|
title: "Enable Daily Registry Backup Task 12.30am"
|
|
description: ""
|
|
---
|
|
|
|
```json {filename="config/feature.json",linenos=inline,linenostart=82}
|
|
"WPFFeatureRegBackup": {
|
|
"Content": "Enable Daily Registry Backup Task 12.30am",
|
|
"Description": "Enables daily registry backup, previously disabled by Microsoft in Windows 10 1803.",
|
|
"category": "Features",
|
|
"panel": "1",
|
|
"feature": [],
|
|
"InvokeScript": [
|
|
"
|
|
New-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager' -Name 'EnablePeriodicBackup' -Type DWord -Value 1 -Force
|
|
New-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager' -Name 'BackupCount' -Type DWord -Value 2 -Force
|
|
$action = New-ScheduledTaskAction -Execute 'schtasks' -Argument '/run /i /tn \"\\Microsoft\\Windows\\Registry\\RegIdleBackup\"'
|
|
$trigger = New-ScheduledTaskTrigger -Daily -At 00:30
|
|
Register-ScheduledTask -Action $action -Trigger $trigger -TaskName 'AutoRegBackup' -Description 'Create System Registry Backups' -User 'System'
|
|
"
|
|
],
|
|
```
|