From 48dc5955afde6a07872da8256c2e1066bc23e9e3 Mon Sep 17 00:00:00 2001 From: simeononsecurity <4913771+simeononsecurity@users.noreply.github.com> Date: Sat, 10 Apr 2021 00:05:08 -0500 Subject: [PATCH] Update --- windows10-basic.ps1 | 7 +++++++ windows10.ps1 | 14 ++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/windows10-basic.ps1 b/windows10-basic.ps1 index 638dcd0..b799691 100644 --- a/windows10-basic.ps1 +++ b/windows10-basic.ps1 @@ -138,4 +138,11 @@ Start-Job -Name "Customizations" -ScriptBlock { #Uncomment the next line to make clean start menu default for all new users Import-StartLayout -LayoutPath $layoutFile -MountPath $env:SystemDrive\ Remove-Item $layoutFile + + Write-Host "Disabling Action Center..." + If (!(Test-Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer")) { + New-Item -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer" | Out-Null + } + Set-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "DisableNotificationCenter" -Type DWord -Value 1 + Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\PushNotifications" -Name "ToastEnabled" -Type DWord -Value 0 } diff --git a/windows10.ps1 b/windows10.ps1 index 3270241..30689d6 100644 --- a/windows10.ps1 +++ b/windows10.ps1 @@ -348,11 +348,13 @@ Start-Job -Name "Configuring Windows - Optimizations, Debloating, and Hardening" Set-Item $Paint3D $rmPaint3D } } + + Write-Host "Disabling Action Center..." + If (!(Test-Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer")) { + New-Item -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer" | Out-Null + } + Set-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "DisableNotificationCenter" -Type DWord -Value 1 + Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\PushNotifications" -Name "ToastEnabled" -Type DWord -Value 0 } -Write-Host "Disabling Action Center..." -If (!(Test-Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer")) { - New-Item -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer" | Out-Null -} -Set-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "DisableNotificationCenter" -Type DWord -Value 1 -Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\PushNotifications" -Name "ToastEnabled" -Type DWord -Value 0 +