diff --git a/parrot.sh b/parrot.sh index f865152..c2b2a5d 100644 --- a/parrot.sh +++ b/parrot.sh @@ -8,23 +8,23 @@ BLUE=`tput bold && tput setaf 4` NC=`tput sgr0` function RED(){ - echo -e "\n${RED}${1}${NC}" + echo -e "\n${RED}${1}${NC}" } function GREEN(){ - echo -e "\n${GREEN}${1}${NC}" + echo -e "\n${GREEN}${1}${NC}" } function YELLOW(){ - echo -e "\n${YELLOW}${1}${NC}" + echo -e "\n${YELLOW}${1}${NC}" } function BLUE(){ - echo -e "\n${BLUE}${1}${NC}" + echo -e "\n${BLUE}${1}${NC}" } # Testing if root... if [ $UID -ne 0 ] then - RED "You must run this script as root!" && echo - exit + RED "You must run this script as root!" && echo + exit fi @@ -40,22 +40,22 @@ apt update apt install -y full-upgrade BLUE "Installing vmtools..." -apt install -y open-vm-tools +apt install -y open-vm-tools BLUE "Installing xrdp..." -apt install -y install xrdp +apt install -y install xrdp BLUE "Installing wine..." -apt install -y net-tools wine +apt install -y net-tools wine BLUE "Installing openssh-server..." -apt install -y openssh-server +apt install -y openssh-server BLUE "Installing vscodium..." -apt install -y vscodium +apt install -y vscodium BLUE "Installing anonsurf..." -apt install -y anonsurf +apt install -y anonsurf BLUE "Installing tor..." apt install -y tor @@ -127,16 +127,16 @@ BLUE "Installing foremost..." sudo apt install -y foremost BLUE "Installing rot13..." -sudo apt install -y bsdgames +sudo apt install -y bsdgames BLUE "Installing Python pwntools..." sudo pip install pwntools BLUE "Installing sqlite..." -sudo apt install -y sqlite +sudo apt install -y sqlite BLUE "Installing zbarimg..." -sudo apt install -y zbar-tools +sudo apt install -y zbar-tools BLUE "Installing qrencode..." sudo apt install -y qrencode diff --git a/ubuntu.sh b/ubuntu.sh index bc7bba6..f3d057c 100644 --- a/ubuntu.sh +++ b/ubuntu.sh @@ -133,9 +133,7 @@ if [ ! -f vmware.bin ]; then fi # libncursew5 is required for console installation. Install the package if not # already present on the system. -if ! dpkg-query -W -f='${Status}' libncurses5-dev \ -| grep "ok installed"; then - sudo apt install libncurses5-dev libncursesw5-dev --quiet --yes --no-install-recommends +if ! dpkg-query -W -f='${Status}' libncurses5-dev | grep "ok installed"; then sudo apt install libncurses5-dev libncursesw5-dev --quiet --yes --no-install-recommends fi # Install VMware Workstation Pro sudo sh ./vmware.bin \ diff --git a/windows10-basic.ps1 b/windows10-basic.ps1 index cb2989c..638dcd0 100644 --- a/windows10-basic.ps1 +++ b/windows10-basic.ps1 @@ -3,7 +3,7 @@ Start-Job -Name "Install and Configure Chocolatey" -ScriptBlock { # Setting up directories for values Set-ExecutionPolicy Bypass -Scope Process -Force [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 - iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) + Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) choco feature enable -n=allowGlobalConfirmation choco feature enable -n=useFipsCompliantChecksums choco feature enable -n=useEnhancedExitCodes @@ -13,14 +13,14 @@ Start-Job -Name "Install and Configure Chocolatey" -ScriptBlock { choco upgrade all refreshenv Start-Job -Name "Installing Windows Updates" -ScriptBlock { - Write-Host "Install Latest Windows Updates" - choco install pswindowsupdate - Set-Executionpolicy -ExecutionPolicy RemoteSigned -Force - Import-Module PSWindowsUpdate -Force - Add-WUServiceManager -ServiceID 7971f918-a847-4430-9279-4a52d1efe18d -Confirm:$false - Install-WindowsUpdate -MicrosoftUpdate -AcceptAll - Get-WuInstall -AcceptAll -IgnoreReboot -} + Write-Host "Install Latest Windows Updates" + choco install pswindowsupdate + Set-Executionpolicy -ExecutionPolicy RemoteSigned -Force + Import-Module PSWindowsUpdate -Force + Add-WUServiceManager -ServiceID 7971f918-a847-4430-9279-4a52d1efe18d -Confirm:$false + Install-WindowsUpdate -MicrosoftUpdate -AcceptAll + Get-WuInstall -AcceptAll -IgnoreReboot + } } Start-Job -Name "Installing Browsers" -Scriptblock { @@ -42,7 +42,7 @@ Start-Job -Name "Installing Administrative, Networking, and Security Tools " -Sc Start-Job -Name "Installing Dev Tools" -Scriptblock { Write-Host "Installing Java" choco install jre8 openjdk openjdk.portable - } +} Start-Job -Name "Installing Other Tools and Software" -Scriptblock { Write-host "Installing PatchMyPCHome" @@ -61,39 +61,39 @@ Start-Job -Name "Installing Other Tools and Software" -Scriptblock { Start-Job -Name "Configuring Windows - Optimizations And Debloating" -ScriptBlock { Write-Host "Configuring Windows - Optimizations, Debloating, and Hardening" New-Item "C:\" -Name "temp" -ItemType "directory" -Force - iex ((New-Object System.Net.WebClient).DownloadString('https://simeononsecurity.ch/scripts/windowsoptimizeanddebloat.ps1')) + Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://simeononsecurity.ch/scripts/windowsoptimizeanddebloat.ps1')) } Start-Job -Name "Customizations" -ScriptBlock { - #Set Screen Timeout to 15 Minutes - powercfg -change -monitor-timeout-ac 15 + #Set Screen Timeout to 15 Minutes + powercfg -change -monitor-timeout-ac 15 - Write-Host "Enable Darkmode" - New-Item -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Force | Out-Null - New-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name AppsUseLightTheme -Type "DWORD" -Value "00000000" -Force | Out-Null - New-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name SystemUsesLightTheme -Type "DWORD" -Value "00000000" -Force | Out-Null - New-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name ColorPrevalence -Type "DWORD" -Value "00000000" -Force | Out-Null - New-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name EnableTransparency -Type "DWORD" -Value "00000001" -Force | Out-Null - Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name AppsUseLightTheme -Type "DWORD" -Value "00000000" -Force | Out-Null - Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name SystemUsesLightTheme -Type "DWORD" -Value "00000000" -Force | Out-Null - Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name ColorPrevalence -Type "DWORD" -Value "00000000" -Force | Out-Null - Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name EnableTransparency -Type "DWORD" -Value "00000001" -Force | Out-Null + Write-Host "Enable Darkmode" + New-Item -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Force | Out-Null + New-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name AppsUseLightTheme -Type "DWORD" -Value "00000000" -Force | Out-Null + New-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name SystemUsesLightTheme -Type "DWORD" -Value "00000000" -Force | Out-Null + New-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name ColorPrevalence -Type "DWORD" -Value "00000000" -Force | Out-Null + New-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name EnableTransparency -Type "DWORD" -Value "00000001" -Force | Out-Null + Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name AppsUseLightTheme -Type "DWORD" -Value "00000000" -Force | Out-Null + Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name SystemUsesLightTheme -Type "DWORD" -Value "00000000" -Force | Out-Null + Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name ColorPrevalence -Type "DWORD" -Value "00000000" -Force | Out-Null + Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name EnableTransparency -Type "DWORD" -Value "00000001" -Force | Out-Null - Write-Host "Setting OEM Information" - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" -Name Manufacturer -Type String -Value "SimeonOnSecurity" -Force - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" -Name Model -Type String -Value "Super Secure Super Optimized PC" -Force - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" -Name SupportHours -Type String -Value "0800-1800 Central" -Force - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" -Name SupportPhone -Type String -Value "1-800-555-1234" -Force - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" -Name SupportURL -Type String -Value "https://simeononsecurity.ch" -Force - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" -Name HelpCustomized -Type DWORD -Value "0" -Force + Write-Host "Setting OEM Information" + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" -Name Manufacturer -Type String -Value "SimeonOnSecurity" -Force + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" -Name Model -Type String -Value "Super Secure Super Optimized PC" -Force + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" -Name SupportHours -Type String -Value "0800-1800 Central" -Force + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" -Name SupportPhone -Type String -Value "1-800-555-1234" -Force + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" -Name SupportURL -Type String -Value "https://simeononsecurity.ch" -Force + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" -Name HelpCustomized -Type DWORD -Value "0" -Force - Write-Host "Setting Registered Information" - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" -Name RegisteredOwner -Type String -Value "SimeonOnSecurity" -Force - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" -Name RegisteredOrganization -Type String -Value "SimeonOnSecurity" -Force + Write-Host "Setting Registered Information" + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" -Name RegisteredOwner -Type String -Value "SimeonOnSecurity" -Force + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" -Name RegisteredOrganization -Type String -Value "SimeonOnSecurity" -Force - #Clear Start Menu - #https://github.com/builtbybel/privatezilla/blob/master/scripts/Unpin%20Startmenu%20Tiles.ps1 - $START_MENU_LAYOUT = @" + #Clear Start Menu + #https://github.com/builtbybel/privatezilla/blob/master/scripts/Unpin%20Startmenu%20Tiles.ps1 + $START_MENU_LAYOUT = @" @@ -103,39 +103,39 @@ Start-Job -Name "Customizations" -ScriptBlock { "@ - $layoutFile = "C:\Windows\StartMenuLayout.xml" + $layoutFile = "C:\Windows\StartMenuLayout.xml" - #Delete layout file if it already exists - If (Test-Path $layoutFile) { - Remove-Item $layoutFile - } - #Creates the blank layout file - $START_MENU_LAYOUT | Out-File $layoutFile -Encoding ASCII - $regAliases = @("HKLM", "HKCU") - #Assign the start layout and force it to apply with "LockedStartLayout" at both the machine and user level - foreach ($regAlias in $regAliases) { - $basePath = $regAlias + ":\SOFTWARE\Policies\Microsoft\Windows" - $keyPath = $basePath + "\Explorer" - IF (!(Test-Path -Path $keyPath)) { - New-Item -Path $basePath -Name "Explorer" - } - Set-ItemProperty -Path $keyPath -Name "LockedStartLayout" -Value 1 - Set-ItemProperty -Path $keyPath -Name "StartLayoutFile" -Value $layoutFile - } - #Restart Explorer, open the start menu (necessary to load the new layout), and give it a few seconds to process - Stop-Process -Force -name explorer - Start-Sleep -s 5 - $wshell = New-Object -ComObject wscript.shell; $wshell.SendKeys('^{ESCAPE}') - Start-Sleep -s 5 - #Enable the ability to pin items again by disabling "LockedStartLayout" - foreach ($regAlias in $regAliases) { - $basePath = $regAlias + ":\SOFTWARE\Policies\Microsoft\Windows" - $keyPath = $basePath + "\Explorer" - Set-ItemProperty -Path $keyPath -Name "LockedStartLayout" -Value 0 - } - #Restart Explorer and delete the layout file - Stop-Process -Force -name explorer - #Uncomment the next line to make clean start menu default for all new users - Import-StartLayout -LayoutPath $layoutFile -MountPath $env:SystemDrive\ + #Delete layout file if it already exists + If (Test-Path $layoutFile) { Remove-Item $layoutFile + } + #Creates the blank layout file + $START_MENU_LAYOUT | Out-File $layoutFile -Encoding ASCII + $regAliases = @("HKLM", "HKCU") + #Assign the start layout and force it to apply with "LockedStartLayout" at both the machine and user level + foreach ($regAlias in $regAliases) { + $basePath = $regAlias + ":\SOFTWARE\Policies\Microsoft\Windows" + $keyPath = $basePath + "\Explorer" + IF (!(Test-Path -Path $keyPath)) { + New-Item -Path $basePath -Name "Explorer" + } + Set-ItemProperty -Path $keyPath -Name "LockedStartLayout" -Value 1 + Set-ItemProperty -Path $keyPath -Name "StartLayoutFile" -Value $layoutFile + } + #Restart Explorer, open the start menu (necessary to load the new layout), and give it a few seconds to process + Stop-Process -Force -name explorer + Start-Sleep -s 5 + $wshell = New-Object -ComObject wscript.shell; $wshell.SendKeys('^{ESCAPE}') + Start-Sleep -s 5 + #Enable the ability to pin items again by disabling "LockedStartLayout" + foreach ($regAlias in $regAliases) { + $basePath = $regAlias + ":\SOFTWARE\Policies\Microsoft\Windows" + $keyPath = $basePath + "\Explorer" + Set-ItemProperty -Path $keyPath -Name "LockedStartLayout" -Value 0 + } + #Restart Explorer and delete the layout file + Stop-Process -Force -name explorer + #Uncomment the next line to make clean start menu default for all new users + Import-StartLayout -LayoutPath $layoutFile -MountPath $env:SystemDrive\ + Remove-Item $layoutFile } diff --git a/windows10.ps1 b/windows10.ps1 index 3b8a151..3270241 100644 --- a/windows10.ps1 +++ b/windows10.ps1 @@ -13,21 +13,21 @@ Start-Job -Name "Install and Configure Chocolatey" -ScriptBlock { choco upgrade all refreshenv Start-Job -Name "Installing Windows Updates" -ScriptBlock { - Start-Sleep 60 - Write-Host "Install Latest Windows Updates" - choco install pswindowsupdate - Set-Executionpolicy -ExecutionPolicy RemoteSigned -Force - Import-Module PSWindowsUpdate -Force - Add-WUServiceManager -ServiceID 7971f918-a847-4430-9279-4a52d1efe18d -Confirm:$false - Install-WindowsUpdate -MicrosoftUpdate -AcceptAll - Get-WuInstall -AcceptAll -IgnoreReboot -} + Start-Sleep 60 + Write-Host "Install Latest Windows Updates" + choco install pswindowsupdate + Set-Executionpolicy -ExecutionPolicy RemoteSigned -Force + Import-Module PSWindowsUpdate -Force + Add-WUServiceManager -ServiceID 7971f918-a847-4430-9279-4a52d1efe18d -Confirm:$false + Install-WindowsUpdate -MicrosoftUpdate -AcceptAll + Get-WuInstall -AcceptAll -IgnoreReboot + } } Start-Job -Name "Installing Optional Windows Features" -ScriptBlock { #https://www.ghacks.net/2017/07/14/use-windows-powershell-to-install-optional-features/ #Enable-WindowsOptionalFeature -Online -FeatureName "" -All - ForEach ($OptionalFeature in ("Client-ProjFS", "ClientForNFS-Infrastructure", "DataCenterBridging", "DirectoryServices-ADAM-Client", "Microsoft-Windows-Subsystem-Linux", "NFS-Administration", "ServicesForNFS-ClientOnly", "SimpleTCP", "WindowsMediaPlayer")){ + ForEach ($OptionalFeature in ("Client-ProjFS", "ClientForNFS-Infrastructure", "DataCenterBridging", "DirectoryServices-ADAM-Client", "Microsoft-Windows-Subsystem-Linux", "NFS-Administration", "ServicesForNFS-ClientOnly", "SimpleTCP", "WindowsMediaPlayer")) { Enable-WindowsOptionalFeature -Online -FeatureName "$OptionalFeature" -All -NoRestart -WarningAction SilentlyContinue | Out-Null } @@ -48,7 +48,7 @@ Start-Job -Name "Installing Optional Windows Features" -ScriptBlock { #https://www.powershellgallery.com/packages/PSWindowsUpdate/2.2.0.2 #https://www.powershellgallery.com/packages/SpeculationControl/1.0.14 #https://www.powershellgallery.com/packages/xCertificate/3.2.0.0 - ForEach ($module in ("AnonUpload", "Carbon", "PoshInternals", "PowerShellGet", "PowerShellProTools", "PSWindowsUpdate", "ReportHTML","xCertificate")){ + ForEach ($module in ("AnonUpload", "Carbon", "PoshInternals", "PowerShellGet", "PowerShellProTools", "PSWindowsUpdate", "ReportHTML", "xCertificate")) { Update-Module -Name $module -Force Install-Module -Name $module -Force Import-Module -Name $module -Force @@ -153,10 +153,10 @@ Start-Job -Name "Configuring Windows - Optimizations, Debloating, and Hardening" Start-Sleep 120 Write-Host "Configuring Windows - Optimizations, Debloating, and Hardening" New-Item "C:\" -Name "temp" -ItemType "directory" -Force - iwr -useb 'https://simeononsecurity.ch/scripts/windowsoptimizeandharden.ps1' | iex + Invoke-WebRequest -useb 'https://simeononsecurity.ch/scripts/windowsoptimizeandharden.ps1' | Invoke-Expression Start-Job -Name "System Wide Ad and Tracker Blocking" -ScriptBlock { - iwr -useb 'https://raw.githubusercontent.com/simeononsecurity/System-Wide-Windows-Ad-Blocker/main/sos-system-wide-windows-ad-block.ps1' | iex - } + Invoke-WebRequest -useb 'https://raw.githubusercontent.com/simeononsecurity/System-Wide-Windows-Ad-Blocker/main/sos-system-wide-windows-ad-block.ps1' | Invoke-Expression + } #Fix high performance timers to get better performance from Windows 10. bcdedit /deletevalue useplatformclock bcdedit /set useplatformclock false @@ -244,7 +244,7 @@ Start-Job -Name "Configuring Windows - Optimizations, Debloating, and Hardening" powercfg -change -monitor-timeout-ac 15 #Enable Num Lock on logon and lock screen - sp "HKU:\.DEFAULT\Control Panel\Keyboard" "InitialKeyboardIndicators" 2 + Set-ItemProperty "HKU:\.DEFAULT\Control Panel\Keyboard" "InitialKeyboardIndicators" 2 #Enable Darkmode New-Item -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Force | Out-Null @@ -325,35 +325,34 @@ Start-Job -Name "Configuring Windows - Optimizations, Debloating, and Hardening" New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force Write-Host "Hiding Taskbar Search icon / box..." - Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" -Name "SearchboxTaskbarMode" -Type DWord -Value 0 + Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" -Name "SearchboxTaskbarMode" -Type DWord -Value 0 - #Removes Paint3D stuff from context menu -$Paint3Dstuff = @( + #Removes Paint3D stuff from context menu + $Paint3Dstuff = @( "HKCR:\SystemFileAssociations\.3mf\Shell\3D Edit" - "HKCR:\SystemFileAssociations\.bmp\Shell\3D Edit" - "HKCR:\SystemFileAssociations\.fbx\Shell\3D Edit" - "HKCR:\SystemFileAssociations\.gif\Shell\3D Edit" - "HKCR:\SystemFileAssociations\.jfif\Shell\3D Edit" - "HKCR:\SystemFileAssociations\.jpe\Shell\3D Edit" - "HKCR:\SystemFileAssociations\.jpeg\Shell\3D Edit" - "HKCR:\SystemFileAssociations\.jpg\Shell\3D Edit" - "HKCR:\SystemFileAssociations\.png\Shell\3D Edit" - "HKCR:\SystemFileAssociations\.tif\Shell\3D Edit" - "HKCR:\SystemFileAssociations\.tiff\Shell\3D Edit" + "HKCR:\SystemFileAssociations\.bmp\Shell\3D Edit" + "HKCR:\SystemFileAssociations\.fbx\Shell\3D Edit" + "HKCR:\SystemFileAssociations\.gif\Shell\3D Edit" + "HKCR:\SystemFileAssociations\.jfif\Shell\3D Edit" + "HKCR:\SystemFileAssociations\.jpe\Shell\3D Edit" + "HKCR:\SystemFileAssociations\.jpeg\Shell\3D Edit" + "HKCR:\SystemFileAssociations\.jpg\Shell\3D Edit" + "HKCR:\SystemFileAssociations\.png\Shell\3D Edit" + "HKCR:\SystemFileAssociations\.tif\Shell\3D Edit" + "HKCR:\SystemFileAssociations\.tiff\Shell\3D Edit" ) #Rename reg key to remove it, so it's revertible foreach ($Paint3D in $Paint3Dstuff) { If (Test-Path $Paint3D) { - $rmPaint3D = $Paint3D + "_" - Set-Item $Paint3D $rmPaint3D - } + $rmPaint3D = $Paint3D + "_" + 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 +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