Skip to content

Commit

Permalink
Improved UndoAll
Browse files Browse the repository at this point in the history
this now removes all local security and group policy items on the PC to make sure it is at stock settings.
  • Loading branch information
ChrisTitusTech committed Aug 19, 2021
1 parent daf9940 commit 3c088f9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@

defltbase.jfm
OOSU10.exe
defltbase.sdb
24 changes: 22 additions & 2 deletions win10debloat.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -658,8 +658,6 @@ $essentialtweaks.Add_Click({
Write-Host "Stopping and disabling Superfetch service..."
Stop-Service "SysMain" -WarningAction SilentlyContinue
Set-Service "SysMain" -StartupType Disabled
Write-Host "Setting BIOS time to UTC..."
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" -Name "RealTimeIsUniversal" -Type DWord -Value 1
Write-Host "Disabling Hibernation..."
Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Session Manager\Power" -Name "HibernteEnabled" -Type Dword -Value 0
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings")) {
Expand Down Expand Up @@ -717,6 +715,16 @@ $essentialtweaks.Add_Click({

Write-Host "Disable News and Interests"
Set-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Windows Feeds" -Name "EnableFeeds" -Type DWord -Value 0
# Remove "News and Interest" from taskbar
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Feeds" -Name "ShellFeedsTaskbarViewMode" -Type DWord -Value 2

# remove "Meet Now" button from taskbar

If (!(Test-Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer")) {
New-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Force | Out-Null
}

Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "HideSCAMeetNow" -Type DWord -Value 1

Write-Host "Removing AutoLogger file and restricting directory..."
$autoLoggerDir = "$env:PROGRAMDATA\Microsoft\Diagnosis\ETLLogs\AutoLogger"
Expand All @@ -735,6 +743,11 @@ $essentialtweaks.Add_Click({
Write-Host "Essential Tweaks Completed"
})

$dualboottime.Add_Click({
Write-Host "Setting BIOS time to UTC..."
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" -Name "RealTimeIsUniversal" -Type DWord -Value 1
})

$essentialundo.Add_Click({
Write-Host "Creating Restore Point incase something bad happens"
Enable-ComputerRestore -Drive "C:\"
Expand Down Expand Up @@ -841,6 +854,13 @@ $essentialundo.Add_Click({
Write-Host "Hiding known file extensions"
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "HideFileExt" -Type DWord -Value 1

Write-Host "Reset All Security and Local Group Policies to Stock Defaults"
cmd /c secedit /configure /cfg %windir%\inf\defltbase.inf /db defltbase.sdb /verbose
cmd /c RD /S /Q "%WinDir%\System32\GroupPolicyUsers"
cmd /c RD /S /Q "%WinDir%\System32\GroupPolicy"
cmd /c gpupdate /force
# Considered using Invoke-GPUpdate but requires module most people won't have installed

Write-Host "Essential Undo Completed"
})

Expand Down

0 comments on commit 3c088f9

Please sign in to comment.