Created
September 3, 2023 08:00
-
-
Save hl2guide/cbb7dab4ad875d8165b76dd35fe28852 to your computer and use it in GitHub Desktop.
PowerShell - Improve Windows after New Install (in development)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Improves Windows 11/10 after a fresh install - Run as Admin | |
$boolSetDarkModeForApps = $true | |
$boolSetDarkModeForSystem = $true | |
# Sets dark or light mode | |
if($boolSetDarkModeForApps -eq $true) | |
{ | |
# Sets dark mode for apps | |
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize ` | |
-Name AppsUseLightTheme -Value 0 -Type Dword -ErrorAction SilentlyContinue | |
} | |
else | |
{ | |
# Sets light mode for apps | |
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize ` | |
-Name AppsUseLightTheme -Value 1 -Type Dword -ErrorAction SilentlyContinue | |
} | |
if($boolSetDarkModeForSystem) | |
{ | |
# Sets dark mode for system | |
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize ` | |
-Name SystemUsesLightTheme -Value 0 -Type Dword -Force -ErrorAction SilentlyContinue | |
} | |
else | |
{ | |
# Sets light mode for system | |
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize ` | |
-Name SystemUsesLightTheme -Value 1 -Type Dword -Force -ErrorAction SilentlyContinue | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment