Compare commits
23 Commits
e4438cb8a6
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3d219ccd50 | ||
|
|
fcbb34ea40 | ||
|
|
07e940bcdf | ||
|
|
56cc763c0e | ||
|
|
4dc59971a8 | ||
|
|
f5d540ea4b | ||
|
|
cbaac31ee8 | ||
|
|
b61933fc31 | ||
|
|
e355ea3263 | ||
|
|
b29c4dfa3b | ||
|
|
d6449f5d8a | ||
|
|
5462c96a01 | ||
|
|
293c025e62 | ||
|
|
a0fe8ff52a | ||
|
|
1b95401e61 | ||
|
|
3ee88aac48 | ||
|
|
7674c670e8 | ||
|
|
876a63c3d3 | ||
|
|
42562b8bec | ||
|
|
d627c54615 | ||
|
|
60b4e73305 | ||
|
|
757b40c109 | ||
|
|
faf132d017 |
@@ -1,23 +0,0 @@
|
|||||||
Microsoft Clipchamp
|
|
||||||
Microsoft Teams
|
|
||||||
Microsoft News
|
|
||||||
Microsoft Bing
|
|
||||||
MSN Weather
|
|
||||||
Microsoft Edge Game Assist
|
|
||||||
Xbox
|
|
||||||
Microsoft 365 Copilot
|
|
||||||
Solitaire & Casual Games
|
|
||||||
Microsoft Sticky Notes
|
|
||||||
Outlook for Windows
|
|
||||||
Paint
|
|
||||||
Power Automate
|
|
||||||
Microsoft To Do
|
|
||||||
Widgets Platform Runtime
|
|
||||||
Windows Sound Recorder
|
|
||||||
Xbox TCUI
|
|
||||||
Game Bar
|
|
||||||
Xbox Identity Provider
|
|
||||||
Game Speech Window
|
|
||||||
Phone Link
|
|
||||||
Windows Web Experience Pack
|
|
||||||
9MSSGKG348SP
|
|
||||||
128
bloatware.txt
Normal file
128
bloatware.txt
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
9MSSGKG348SP
|
||||||
|
9NBLGGH42THS
|
||||||
|
ACGMediaPlayer
|
||||||
|
ActiproSoftwareLLC
|
||||||
|
AD2F1837.HPPCHardwareDiagnosticsWindows
|
||||||
|
AD2F1837.HPPowerManager
|
||||||
|
AD2F1837.HPPrivacySettings
|
||||||
|
AD2F1837.HPQuickDrop
|
||||||
|
AD2F1837.HPSupportAssistant
|
||||||
|
AD2F1837.HPSystemInformation
|
||||||
|
AD2F1837.myHP
|
||||||
|
AdobeSystemsIncorporated.AdobePhotoshopExpress
|
||||||
|
Amazon.com.Amazon
|
||||||
|
AmazonVideo.PrimeVideo
|
||||||
|
Asphalt8Airborne
|
||||||
|
AutodeskSketchBook
|
||||||
|
CaesarsSlotsFreeCasino
|
||||||
|
COOKINGFEVER
|
||||||
|
CyberLinkMediaSuiteEssentials
|
||||||
|
Dell Core Services
|
||||||
|
Dell Digital Delivery
|
||||||
|
Dell Digital Delivery Service
|
||||||
|
DellInc.DellCommandUpdate
|
||||||
|
DellInc.DellDigitalDelivery
|
||||||
|
DellInc.DellOptimizer
|
||||||
|
DellInc.DellPowerManager
|
||||||
|
DellInc.DellSupportAssistforPCs
|
||||||
|
DellInc.PartnerPromo
|
||||||
|
Dell Optimizer
|
||||||
|
Dell Optimizer Core
|
||||||
|
Dell Optimizer Service
|
||||||
|
DellOptimizerUI
|
||||||
|
Dell Pair
|
||||||
|
Dell Peripheral Manager
|
||||||
|
Dell Power Manager
|
||||||
|
Dell Power Manager Service
|
||||||
|
Dell SupportAssist
|
||||||
|
Dell SupportAssistAgent
|
||||||
|
Dell SupportAssist OS Recovery
|
||||||
|
Dell SupportAssist OS Recovery Plugin for Dell Update
|
||||||
|
Dell SupportAssist Remediation
|
||||||
|
Dell Update - SupportAssist Update Plugin
|
||||||
|
Dev Home
|
||||||
|
Disney
|
||||||
|
Disney+
|
||||||
|
DisneyMagicKingdoms
|
||||||
|
DrawboardPDF
|
||||||
|
Duolingo-LearnLanguagesforFree
|
||||||
|
EclipseManager
|
||||||
|
Facebook
|
||||||
|
FarmVille2CountryEscape
|
||||||
|
Feedback Hub
|
||||||
|
fitbit
|
||||||
|
Flipboard
|
||||||
|
Game Bar
|
||||||
|
Game Speech Window
|
||||||
|
HiddenCity
|
||||||
|
HP Client Security Manager
|
||||||
|
HP Insights
|
||||||
|
HP Insights Analytics
|
||||||
|
HP Insights Analytics Service
|
||||||
|
HP Notifications
|
||||||
|
HP Performance Advisor
|
||||||
|
HP Presence Video
|
||||||
|
HP Security Update Service
|
||||||
|
HP Support Assistant
|
||||||
|
HP Sure Recover
|
||||||
|
HP Sure Run Module
|
||||||
|
HP System Default Settings
|
||||||
|
HP Wolf Security
|
||||||
|
HP Wolf Security - Console
|
||||||
|
HULULLC.HULUPLUS
|
||||||
|
iHeartRadio
|
||||||
|
Instagram
|
||||||
|
king.com.BubbleWitch3Saga
|
||||||
|
king.com.CandyCrushSaga
|
||||||
|
king.com.CandyCrushSodaSaga
|
||||||
|
LinkedInforWindows
|
||||||
|
MarchofEmpires
|
||||||
|
Microsoft 365 Copilot
|
||||||
|
Microsoft 365 (Office)
|
||||||
|
Microsoft Bing
|
||||||
|
Microsoft Clipchamp
|
||||||
|
Microsoft Edge Game Assist
|
||||||
|
Microsoft News
|
||||||
|
Microsoft OneDrive
|
||||||
|
Microsoft Photos
|
||||||
|
Microsoft Sticky Notes
|
||||||
|
Microsoft Teams
|
||||||
|
Microsoft To Do
|
||||||
|
MSN Weather
|
||||||
|
Netflix
|
||||||
|
News
|
||||||
|
NYTCrossword
|
||||||
|
OneCalendar
|
||||||
|
Outlook for Windows
|
||||||
|
Paint
|
||||||
|
PandoraMediaInc
|
||||||
|
Phone Link
|
||||||
|
PhototasticCollage
|
||||||
|
PicsArt-PhotoStudio
|
||||||
|
Plex
|
||||||
|
PolarrPhotoEditorAcademicEdition
|
||||||
|
Poly Lens
|
||||||
|
Power Automate
|
||||||
|
Royal Revolt
|
||||||
|
Shazam
|
||||||
|
Sidia.LiveWallpaper
|
||||||
|
SlingTV
|
||||||
|
Snipping Tool
|
||||||
|
Solitaire & Casual Games
|
||||||
|
Spotify
|
||||||
|
SupportAssist Recovery Assistant
|
||||||
|
TikTok
|
||||||
|
TuneInRadio
|
||||||
|
Viber
|
||||||
|
Widgets Platform Runtime
|
||||||
|
Windows Notepad
|
||||||
|
Windows Sound Recorder
|
||||||
|
Windows Web Experience Pack
|
||||||
|
WinZipUniversal
|
||||||
|
Wunderlist
|
||||||
|
Xbox
|
||||||
|
Xbox Identity Provider
|
||||||
|
Xbox TCUI
|
||||||
|
XING
|
||||||
|
Get Help
|
||||||
|
Quick Assist
|
||||||
644
configwinpc.ps1
644
configwinpc.ps1
@@ -1,5 +1,6 @@
|
|||||||
# https://github.com/andrew-s-taylor/public/blob/main/De-Bloat/RemoveBloat.ps1
|
# https://github.com/andrew-s-taylor/public/blob/main/De-Bloat/RemoveBloat.ps1
|
||||||
# https://github.com/marlock9/edge-debloat/blob/main/edge-debloat.reg
|
# https://github.com/marlock9/edge-debloat/blob/main/edge-debloat.reg
|
||||||
|
# https://github.com/Raphire/Win11Debloat/tree/master/Regfiles
|
||||||
|
|
||||||
clear-Host
|
clear-Host
|
||||||
|
|
||||||
@@ -12,45 +13,18 @@ if (-Not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdenti
|
|||||||
Write-Host ""
|
Write-Host ""
|
||||||
Write-Host -ForegroundColor Yellow "
|
Write-Host -ForegroundColor Yellow "
|
||||||
|
|
||||||
######################################################
|
######################################################
|
||||||
# #
|
# #
|
||||||
# #
|
# #
|
||||||
# SCRIPT FOR CONFIGURING AND DEBLOATING WINDOWS 11 #
|
# SCRIPT FOR CONFIGURING AND DEBLOATING WINDOWS 11 #
|
||||||
# #
|
# #
|
||||||
# by dado #
|
# by dado #
|
||||||
######################################################
|
######################################################
|
||||||
|
|
||||||
"
|
"
|
||||||
|
|
||||||
# Sleep for 5 seconds
|
# Sleep for 2 seconds
|
||||||
Start-Sleep -Seconds 10
|
Start-Sleep -Seconds 2
|
||||||
|
|
||||||
clear-Host
|
|
||||||
|
|
||||||
##########################################################################################
|
|
||||||
# #
|
|
||||||
# Software #
|
|
||||||
# #
|
|
||||||
##########################################################################################
|
|
||||||
|
|
||||||
# https://winstall.app/ - Browse the winget repository
|
|
||||||
|
|
||||||
Write-Host ""
|
|
||||||
Write-Host -ForegroundColor Yellow ">>> Upgrade packages... <<<"
|
|
||||||
Write-Host ""
|
|
||||||
winget upgrade --all
|
|
||||||
Write-Host ""
|
|
||||||
|
|
||||||
#Write-Host -ForegroundColor Yellow ">>> Install default software... <<<"
|
|
||||||
#Write-Host ""
|
|
||||||
#winget install --disable-interactivity Microsoft.PowerShell Adobe.Acrobat.Reader.64-bit IZArc.IZArc Oracle.JavaRuntimeEnvironment Google.Chrome 7zip.7zip Microsoft.VCRedist.2010.x64 --source winget
|
|
||||||
|
|
||||||
Write-Host -ForegroundColor DarkGray ">>> Copy 'Supremo' to Public Desktop <<<"
|
|
||||||
$supremo_path=".\supremo.exe"
|
|
||||||
If (Test-Path $supremo_path ) {
|
|
||||||
Copy-Item -Path "$supremo_path" -Destination "C:\Users\Public\Desktop\supremo.exe"
|
|
||||||
}
|
|
||||||
Write-Host ""
|
|
||||||
|
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
# #
|
# #
|
||||||
@@ -67,66 +41,136 @@ $RegistryPaths = @(
|
|||||||
"HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced",
|
"HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced",
|
||||||
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced",
|
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced",
|
||||||
"HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search",
|
"HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search",
|
||||||
"HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer",
|
"HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer",
|
||||||
"HKLM:\Software\Microsoft\Windows\CurrentVersion\Explorer"
|
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Set left align
|
# Loop through each registry path to check if it exists
|
||||||
Write-Host -ForegroundColor DarkGray ">>> Set left align <<<"
|
foreach ($path in $RegistryPaths) {
|
||||||
foreach ($path in $RegistryPaths[0..1]) {
|
if (-not (Test-Path $path)) {
|
||||||
New-ItemProperty -Path $path -Name "TaskbarAl" -Value 0 -Type DWORD -Force | Out-Null
|
New-Item -Path $path -Force | Out-Null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Hide search
|
|
||||||
Write-Host -ForegroundColor DarkGray ">>> Hide search <<<"
|
|
||||||
Set-ItemProperty -Path $RegistryPaths[2] -Name "SearchBoxTaskbarMode" -Value 0 -Type DWORD -Force | Out-Null
|
|
||||||
|
|
||||||
# Hide TaskView button
|
# Hide TaskView button
|
||||||
Write-Host -ForegroundColor DarkGray ">>> Hide TaskView button <<<"
|
Write-Host -ForegroundColor DarkGray ">>> Hide TaskView button <<<"
|
||||||
foreach ($path in $RegistryPaths[0..1]) {
|
foreach ($path in $RegistryPaths[0..1]) {
|
||||||
Set-ItemProperty -Path $path -Name "ShowTaskViewButton" -Value 0 -Type DWORD -Force | Out-Null
|
Set-ItemProperty -Path $path -Name "ShowTaskViewButton" -Value 0 -Type DWORD -Force | Out-Null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Remove Chat from the Taskbar
|
||||||
|
Write-Host -ForegroundColor DarkGray ">>> Removes Chat from the Taskbar <<<"
|
||||||
|
foreach ($path in $RegistryPaths[0..1]) {
|
||||||
|
New-ItemProperty -Path $path -Name "TaskbarMn" -Value 0 -Type DWORD -Force | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
# Disable widgets in the taskbar
|
# Disable widgets in the taskbar
|
||||||
Write-Host -ForegroundColor DarkGray ">>> Disable widgets in the taskbar <<<"
|
Write-Host -ForegroundColor DarkGray ">>> Disable widgets in the taskbar <<<"
|
||||||
Set-ItemProperty -Path $RegistryPaths[0] -Name "TaskbarWidgetsEnabled" -Value 0 | Out-Null
|
Set-ItemProperty -Path $RegistryPaths[0] -Name "TaskbarWidgetsEnabled" -Value 0 | Out-Null
|
||||||
Set-ItemProperty -Path $RegistryPaths[1] -Name "TaskbarWidgetsEnabled" -Value 0 | Out-Null
|
Set-ItemProperty -Path $RegistryPaths[1] -Name "TaskbarWidgetsEnabled" -Value 0 | Out-Null
|
||||||
|
|
||||||
|
# Hide search
|
||||||
|
Write-Host -ForegroundColor DarkGray ">>> Hide search <<<"
|
||||||
|
Set-ItemProperty -Path $RegistryPaths[2] -Name "SearchBoxTaskbarMode" -Value 0 -Type DWORD -Force | Out-Null
|
||||||
|
|
||||||
# Disable the 'Windows + W' keyboard shortcut to open widgets
|
# Disable the 'Windows + W' keyboard shortcut to open widgets
|
||||||
Write-Host -ForegroundColor DarkGray ">>> Disable the 'Windows + W' keyboard shortcut to open widgets <<<"
|
Write-Host -ForegroundColor DarkGray ">>> Disable the 'Windows + W' keyboard shortcut to open widgets <<<"
|
||||||
Set-ItemProperty -Path $RegistryPaths[3] -Name "ShowWindowsW" -Value 0 | Out-Null
|
Set-ItemProperty -Path $RegistryPaths[3] -Name "ShowWindowsW" -Value 0 | Out-Null
|
||||||
Set-ItemProperty -Path $RegistryPaths[4] -Name "ShowWindowsW" -Value 0 | Out-Null
|
Set-ItemProperty -Path $RegistryPaths[4] -Name "ShowWindowsW" -Value 0 | Out-Null
|
||||||
|
|
||||||
# Remove Chat from the Taskbar
|
# Disable the widget service
|
||||||
Write-Host -ForegroundColor DarkGray ">>> Removes Chat from the Taskbar <<<"
|
Write-Host -ForegroundColor DarkGray ">>> Disable widget service <<<"
|
||||||
foreach ($path in $RegistryPaths[0..1]) {
|
|
||||||
New-ItemProperty -Path $path -Name "TaskbarMn" -Value 0 -PropertyType DWORD -Force | Out-Null
|
$widgetPaths = @(
|
||||||
|
"HKLM:\SOFTWARE\Microsoft\PolicyManager\default\NewsAndInterests",
|
||||||
|
"HKLM:\SOFTWARE\Policies\Microsoft\Dsh"
|
||||||
|
)
|
||||||
|
|
||||||
|
foreach ($path in $widgetPaths) {
|
||||||
|
if (-not (Test-Path $path)) {
|
||||||
|
New-Item -Path $path -Force | Out-Null
|
||||||
|
}
|
||||||
|
Set-ItemProperty -Path $path -Name "AllowNewsAndInterests" -Value 0 -Type DWORD -Force | Out-Null
|
||||||
}
|
}
|
||||||
|
|
||||||
# Disabling 'Recommended' section
|
####################################################################################################################################
|
||||||
Write-Host -ForegroundColor DarkGray ">>> Disabling 'Recommended' section <<<"
|
|
||||||
foreach ($path in $RegistryPaths) {
|
# Enable End Task
|
||||||
New-ItemProperty -Path $path -Name "Start_IrisRecommendations" -Value 0 -Type DWORD -Force | Out-Null
|
Write-Host -ForegroundColor DarkGray ">>> Enable End Task <<<"
|
||||||
New-ItemProperty -Path $path -Name "Start_TrackDocs" -Value 0 -Type DWORD -Force | Out-Null
|
|
||||||
New-ItemProperty -Path $path -Name "Start_Layout" -Value 1 -Type DWORD -Force | Out-Null
|
$endTaskPath = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||||
|
|
||||||
|
# Create the path if it doesn't exist
|
||||||
|
if (-not (Test-Path $endTaskPath)) {
|
||||||
|
New-Item -Path $endTaskPath -Force | Out-Null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Set-ItemProperty -Path $endTaskPath -Name "TaskbarEndTask" -Value 1 -Type DWORD -Force | Out-Null
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
|
||||||
|
# Disabling 'Recommended' section
|
||||||
|
Write-Host -ForegroundColor DarkGray ">>> Hide 'Recommended' section <<<"
|
||||||
|
|
||||||
|
$explorerPath = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer"
|
||||||
|
$startPath = "HKLM:\SOFTWARE\Microsoft\PolicyManager\current\device\Start"
|
||||||
|
$educationPath = "HKLM:\SOFTWARE\Microsoft\PolicyManager\current\device\Education"
|
||||||
|
|
||||||
|
# Create the Explorer path if it doesn't exist
|
||||||
|
if (-not (Test-Path $explorerPath)) {
|
||||||
|
New-Item -Path $explorerPath -Force | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
Set-ItemProperty -Path $explorerPath -Name "HideRecommendedSection" -Value 1 -Type DWORD -Force | Out-Null
|
||||||
|
|
||||||
|
# Create the Start path if it doesn't exist
|
||||||
|
if (-not (Test-Path $startPath)) {
|
||||||
|
New-Item -Path $startPath -Force | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
Set-ItemProperty -Path $startPath -Name "HideRecommendedSection" -Value 1 -Type DWORD -Force | Out-Null
|
||||||
|
|
||||||
|
# Create the Education path if it doesn't exist
|
||||||
|
if (-not (Test-Path $educationPath)) {
|
||||||
|
New-Item -Path $educationPath -Force | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
Set-ItemProperty -Path $educationPath -Name "IsEducationEnvironment" -Value 1 -Type DWORD -Force | Out-Null
|
||||||
|
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
|
|
||||||
# Define the registry paths for TaskbarDa
|
####################################################################################################################################
|
||||||
|
|
||||||
|
# Turn off web results in the Start menu
|
||||||
|
Write-Host -ForegroundColor Yellow ">>> Turn off web results in the Start menu <<<"
|
||||||
|
|
||||||
|
# Set the registry paths
|
||||||
$RegistryPaths = @(
|
$RegistryPaths = @(
|
||||||
"HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced",
|
"HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Search",
|
||||||
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
"HKCU:SOFTWARE\Policies\Microsoft\Windows\Explorer"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
$Properties = @{
|
||||||
|
"SearchboxTaskbarMode" = 0
|
||||||
|
"BingSearchEnabled" = 0
|
||||||
|
"DisableSearchBoxSuggestions" = 1
|
||||||
|
}
|
||||||
|
|
||||||
# Iterate over each registry path
|
# Iterate over each registry path
|
||||||
foreach ($taskbarDa_path in $RegistryPaths) {
|
foreach ($RegistryPath in $RegistryPaths) {
|
||||||
# Check if the TaskbarDa property exists and remove it if it does
|
# Create the key if it does not exist
|
||||||
If (Test-Path "$taskbarDa_path\TaskbarDa") {
|
if (-NOT (Test-Path $RegistryPath)) {
|
||||||
Remove-ItemProperty -Path $taskbarDa_path -Name "TaskbarDa" -Force | Out-Null
|
New-Item -Path $RegistryPath -Force | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($Name in $Properties.Keys) {
|
||||||
|
$Value = $Properties[$Name]
|
||||||
|
New-ItemProperty -Path $RegistryPath -Name $Name -Value $Value -Type DWORD -Force | Out-Null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Write-Host ""
|
||||||
|
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
# #
|
# #
|
||||||
# Explorer #
|
# Explorer #
|
||||||
@@ -135,9 +179,9 @@ foreach ($taskbarDa_path in $RegistryPaths) {
|
|||||||
|
|
||||||
Write-Host -ForegroundColor Yellow ">>> Configure File Explorer <<<"
|
Write-Host -ForegroundColor Yellow ">>> Configure File Explorer <<<"
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
Write-Host -ForegroundColor DarkGray ">>> Set File Explorer to Open to This PC Instead of Quick Access <<<"
|
Write-Host -ForegroundColor DarkGray ">>> Open 'This PC' instead of 'Quick Access' <<<"
|
||||||
Write-Host -ForegroundColor DarkGray ">>> Enable Compact View <<<"
|
Write-Host -ForegroundColor DarkGray ">>> Enable Compact View <<<"
|
||||||
Write-Host -ForegroundColor DarkGray ">>> Show file extensions in Explorer <<<"
|
Write-Host -ForegroundColor DarkGray ">>> Show file extensions <<<"
|
||||||
|
|
||||||
# Set the registry paths for both HKLM and HKCU
|
# Set the registry paths for both HKLM and HKCU
|
||||||
$RegistryPaths = @(
|
$RegistryPaths = @(
|
||||||
@@ -152,70 +196,241 @@ $ExplorerProperties = @{
|
|||||||
"HideFileExt" = 0
|
"HideFileExt" = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# Iterate over each registry path
|
|
||||||
foreach ($RegistryPath in $RegistryPaths) {
|
foreach ($RegistryPath in $RegistryPaths) {
|
||||||
# Create the key if it does not exist
|
if (-NOT (Test-Path $RegistryPath)) {
|
||||||
If (-NOT (Test-Path $RegistryPath)) {
|
|
||||||
New-Item -Path $RegistryPath -Force | Out-Null
|
New-Item -Path $RegistryPath -Force | Out-Null
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set the values based on the hashtable
|
|
||||||
foreach ($Name in $ExplorerProperties.Keys) {
|
foreach ($Name in $ExplorerProperties.Keys) {
|
||||||
$Value = $ExplorerProperties[$Name]
|
$Value = $ExplorerProperties[$Name]
|
||||||
New-ItemProperty -Path $RegistryPath -Name $Name -Value $Value -PropertyType DWORD -Force | Out-Null
|
New-ItemProperty -Path $RegistryPath -Name $Name -Value $Value -Type DWORD -Force | Out-Null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
|
||||||
|
# Disable Group By Folder in Windows Explorer
|
||||||
|
Write-Host -ForegroundColor DarkGray ">>> Disabling Group By Folder feature <<<"
|
||||||
|
|
||||||
|
$groupByPath = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||||
|
|
||||||
|
# Create the path if it doesn't exist
|
||||||
|
if (-not (Test-Path $groupByPath)) {
|
||||||
|
New-Item -Path $groupByPath -Force | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
# Set the registry value to disable auto grouping
|
||||||
|
Set-ItemProperty -Path $groupByPath -Name "UseAutoGrouping" -Value 0 -Type DWORD -Force | Out-Null
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
|
||||||
|
# Enable Dark Mode in Windows
|
||||||
|
Write-Host -ForegroundColor DarkGray ">>> Enable Dark Mode <<<"
|
||||||
|
$darkModePath = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize"
|
||||||
|
|
||||||
|
# Create the path if it doesn't exist
|
||||||
|
if (-not (Test-Path $darkModePath)) {
|
||||||
|
New-Item -Path $darkModePath -Force | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
# Set the registry values to enable dark mode
|
||||||
|
Set-ItemProperty -Path $darkModePath -Name "AppsUseLightTheme" -Value 0 -Type DWORD -Force | Out-Null
|
||||||
|
Set-ItemProperty -Path $darkModePath -Name "SystemUsesLightTheme" -Value 0 -Type DWORD -Force | Out-Null
|
||||||
|
|
||||||
|
Write-Host ""
|
||||||
|
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
# #
|
# #
|
||||||
# Spotlight #
|
# Spotlight #
|
||||||
# #
|
# #
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
|
|
||||||
Write-Host ""
|
|
||||||
Write-Host -ForegroundColor Yellow ">>> Disable Spotlight <<<"
|
Write-Host -ForegroundColor Yellow ">>> Disable Spotlight <<<"
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
|
|
||||||
# Define registry paths for Windows Spotlight settings
|
# Define registry paths for Windows Spotlight settings
|
||||||
$RegistryPaths = @(
|
$RegistryPaths = @(
|
||||||
"HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager",
|
"HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager",
|
||||||
"HKLM:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager",
|
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager",
|
||||||
"HKCU:\Software\Policies\Microsoft\Windows\CloudContent",
|
"HKCU:\SOFTWARE\Policies\Microsoft\Windows\CloudContent",
|
||||||
"HKLM:\Software\Policies\Microsoft\Windows\CloudContent"
|
"HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Define properties for lockscreen
|
||||||
|
$LockScreenProperties = @{
|
||||||
|
"RotatingLockScreenOverlayEnabled" = 0
|
||||||
|
"RotatingLockScreenEnabled" = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# Define properties for background
|
||||||
|
$BackgroundProperties = @{
|
||||||
|
"DisableSpotlightCollectionOnDesktop" = 1
|
||||||
|
"DisableWindowsSpotlightFeatures" = 1
|
||||||
|
}
|
||||||
|
|
||||||
# Disable Windows Spotlight on lockscreen
|
# Disable Windows Spotlight on lockscreen
|
||||||
Write-Host -ForegroundColor DarkGray ">>> Disabling Windows Spotlight on lockscreen <<<"
|
Write-Host -ForegroundColor DarkGray ">>> Disabling Windows Spotlight on lockscreen <<<"
|
||||||
foreach ($spotlight in $RegistryPaths[0..1]) {
|
foreach ($spotlight in $RegistryPaths[0..1]) {
|
||||||
If (Test-Path $spotlight) {
|
if (Test-Path $spotlight) {
|
||||||
Set-ItemProperty -Path $spotlight -Name "RotatingLockScreenOverlayEnabled" -Value 0 -Force | Out-Null
|
foreach ($Name in $LockScreenProperties.Keys) {
|
||||||
Set-ItemProperty -Path $spotlight -Name "RotatingLockScreenEnabled" -Value 0 -Force | Out-Null
|
$Value = $LockScreenProperties[$Name]
|
||||||
|
Set-ItemProperty -Path $spotlight -Name $Name -Value $Value -Force | Out-Null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Disable Windows Spotlight on background
|
# Disable Windows Spotlight on background
|
||||||
Write-Host -ForegroundColor DarkGray ">>> Disabling Windows Spotlight on background <<<"
|
Write-Host -ForegroundColor DarkGray ">>> Disabling Windows Spotlight on background <<<"
|
||||||
foreach ($spotlight in $RegistryPaths[2..3]) {
|
foreach ($spotlight in $RegistryPaths[2..3]) {
|
||||||
If (Test-Path $spotlight) {
|
if (Test-Path $spotlight) {
|
||||||
Set-ItemProperty -Path $spotlight -Name "DisableSpotlightCollectionOnDesktop" -Value 1 -Force | Out-Null
|
foreach ($Name in $BackgroundProperties.Keys) {
|
||||||
Set-ItemProperty -Path $spotlight -Name "DisableWindowsSpotlightFeatures" -Value 1 -Force | Out-Null
|
$Value = $BackgroundProperties[$Name]
|
||||||
|
Set-ItemProperty -Path $spotlight -Name $Name -Value $Value -Force | Out-Null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Write-Host ""
|
||||||
|
|
||||||
|
##########################################################################################
|
||||||
|
# #
|
||||||
|
# Telemetry #
|
||||||
|
# #
|
||||||
|
##########################################################################################
|
||||||
|
|
||||||
|
# Configure Windows telemetry and activity tracking settings
|
||||||
|
Write-Host -ForegroundColor Yellow ">>> Disable some telemetry <<<"
|
||||||
|
|
||||||
|
$registryPaths = @(
|
||||||
|
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection",
|
||||||
|
"HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced",
|
||||||
|
"HKLM:\SOFTWARE\Policies\Microsoft\Windows\System",
|
||||||
|
"HKCU:\SOFTWARE\Microsoft\Siuf\Rules"
|
||||||
|
)
|
||||||
|
|
||||||
|
$TelemetryProperties = @{
|
||||||
|
"AllowTelemetry" = 0
|
||||||
|
"PublishUserActivities" = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
$ActivityTrackingProperties = @{
|
||||||
|
"Start_TrackProgs" = 0
|
||||||
|
"NumberOfSIUFInPeriod" = 0
|
||||||
|
"PeriodInNanoSeconds" = -1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Disable telemetry settings
|
||||||
|
foreach ($path in $registryPaths[0..1]) {
|
||||||
|
if (-not (Test-Path $path)) {
|
||||||
|
New-Item -Path $path -Force | Out-Null
|
||||||
|
}
|
||||||
|
foreach ($Name in $TelemetryProperties.Keys) {
|
||||||
|
$Value = $TelemetryProperties[$Name]
|
||||||
|
Set-ItemProperty -Path $path -Name $Name -Value $Value -Type DWORD -Force | Out-Null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Disable activity tracking settings
|
||||||
|
foreach ($path in $registryPaths[2..3]) {
|
||||||
|
if (-not (Test-Path $path)) {
|
||||||
|
New-Item -Path $path -Force | Out-Null
|
||||||
|
}
|
||||||
|
foreach ($Name in $ActivityTrackingProperties.Keys) {
|
||||||
|
$Value = $ActivityTrackingProperties[$Name]
|
||||||
|
Set-ItemProperty -Path $path -Name $Name -Value $Value -Type DWORD -Force | Out-Null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host ""
|
||||||
|
|
||||||
|
##########################################################################################
|
||||||
|
# #
|
||||||
|
# Suggestion #
|
||||||
|
# #
|
||||||
|
##########################################################################################
|
||||||
|
|
||||||
|
# Disable Windows notifications, suggestions, and ads
|
||||||
|
Write-Host -ForegroundColor DarkGray ">>> Turn off Welcome Experience, notifications, suggestions, and ads in Windows <<<"
|
||||||
|
|
||||||
|
# Define registry paths and values to modify
|
||||||
|
$registryEntries = @(
|
||||||
|
@{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SubscribedContent-310093Enabled"; Value = 0 },
|
||||||
|
@{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SubscribedContent-338388Enabled"; Value = 0 },
|
||||||
|
@{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SystemPaneSuggestionsEnabled"; Value = 0 },
|
||||||
|
@{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SubscribedContent-338389Enabled"; Value = 0 },
|
||||||
|
@{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SoftLandingEnabled"; Value = 0 },
|
||||||
|
@{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SubscribedContent-338393Enabled"; Value = 0 },
|
||||||
|
@{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SubscribedContent-353694Enabled"; Value = 0 },
|
||||||
|
@{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SubscribedContent-353696Enabled"; Value = 0 },
|
||||||
|
@{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SubscribedContent-353698Enabled"; Value = 0 },
|
||||||
|
@{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\SystemSettings\AccountNotifications"; Name = "EnableAccountNotifications"; Value = 0 },
|
||||||
|
@{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\UserProfileEngagement"; Name = "ScoobeSystemSettingEnabled"; Value = 0 },
|
||||||
|
@{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced"; Name = "ShowSyncProviderNotifications"; Value = 0 },
|
||||||
|
@{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name = "SilentInstalledAppsEnabled"; Value = 0 },
|
||||||
|
@{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.Suggested"; Name = "Enabled"; Value = 0 },
|
||||||
|
@{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Mobility"; Name = "OptedIn"; Value = 0 },
|
||||||
|
@{ Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced"; Name = "Start_AccountNotifications"; Value = 0 }
|
||||||
|
)
|
||||||
|
|
||||||
|
# Loop through each registry entry and set the values
|
||||||
|
foreach ($entry in $registryEntries) {
|
||||||
|
# Create the path if it doesn't exist
|
||||||
|
if (-not (Test-Path $entry.Path)) {
|
||||||
|
New-Item -Path $entry.Path -Force | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
Set-ItemProperty -Path $entry.Path -Name $entry.Name -Value $entry.Value -Type DWORD -Force | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
##########################################################################################
|
||||||
|
# #
|
||||||
|
# Recall #
|
||||||
|
# #
|
||||||
|
##########################################################################################
|
||||||
|
|
||||||
|
Write-Host -ForegroundColor DarkGray ">>> Disable Recall <<<"
|
||||||
|
|
||||||
|
# Define registry paths for taskbar settings
|
||||||
|
$RegistryPaths = @(
|
||||||
|
"HKCU:\SOFTWARE\Policies\Microsoft\Windows\WindowsAI",
|
||||||
|
"HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsAI"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Loop through each registry path to check if it exists
|
||||||
|
foreach ($path in $RegistryPaths) {
|
||||||
|
# Check if the path does not exist
|
||||||
|
if (-not (Test-Path $path)) {
|
||||||
|
New-Item -Path $path -Force | Out-Null # Create the registry path
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Disable AI data analysis
|
||||||
|
Write-Host -ForegroundColor DarkGray ">>> Disable AI data analysis <<<"
|
||||||
|
foreach ($path in $RegistryPaths[0..1]) {
|
||||||
|
New-ItemProperty -Path $path -Name "DisableAIDataAnalysis" -Value 1 -Type DWORD -Force | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
Set-ItemProperty -Path $RegistryPaths[1] -Name "AllowRecallEnablement" -Value 0 -Type DWORD -Force | Out-Null
|
||||||
|
|
||||||
|
# Turn off Recall snapshots
|
||||||
|
Write-Host -ForegroundColor DarkGray ">>> Turn off Recall snapshots <<<"
|
||||||
|
Set-ItemProperty -Path $RegistryPaths[1] -Name "TurnOffSavingSnapshots" -Value 1 -Type DWORD -Force | Out-Null
|
||||||
|
|
||||||
|
Write-Host ""
|
||||||
|
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
# #
|
# #
|
||||||
# Lock Screen Notifications #
|
# Lock Screen Notifications #
|
||||||
# #
|
# #
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
|
|
||||||
Write-Host ""
|
|
||||||
Write-Host -ForegroundColor Yellow ">>> Disable Notifications on Lock Screen <<<"
|
Write-Host -ForegroundColor Yellow ">>> Disable Notifications on Lock Screen <<<"
|
||||||
|
|
||||||
# Set the registry paths for notifications settings
|
# Set the registry paths for notifications settings
|
||||||
$RegistryPaths = @(
|
$RegistryPaths = @(
|
||||||
"HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings",
|
"HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings",
|
||||||
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings",
|
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings",
|
||||||
"HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\PushNotifications"
|
"HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\PushNotifications",
|
||||||
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\PushNotifications"
|
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\PushNotifications"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -225,31 +440,42 @@ $NotificationProperties = @{
|
|||||||
"LockScreenToastEnabled" = 0
|
"LockScreenToastEnabled" = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# Iterate over each registry path
|
|
||||||
foreach ($RegistryPath in $RegistryPaths) {
|
foreach ($RegistryPath in $RegistryPaths) {
|
||||||
# Create the key if it does not exist
|
if (-NOT (Test-Path $RegistryPath)) {
|
||||||
If (-NOT (Test-Path $RegistryPath)) {
|
|
||||||
New-Item -Path $RegistryPath -Force | Out-Null
|
New-Item -Path $RegistryPath -Force | Out-Null
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set the values based on the hashtable
|
|
||||||
foreach ($Name in $NotificationProperties.Keys) {
|
foreach ($Name in $NotificationProperties.Keys) {
|
||||||
$Value = $NotificationProperties[$Name]
|
$Value = $NotificationProperties[$Name]
|
||||||
New-ItemProperty -Path $RegistryPath -Name $Name -Value $Value -PropertyType DWORD -Force | Out-Null
|
New-ItemProperty -Path $RegistryPath -Name $Name -Value $Value -Type DWORD -Force | Out-Null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
|
||||||
|
Write-Host -ForegroundColor Yellow ">>> Disable Lets finish setting up your device <<<"
|
||||||
|
|
||||||
|
$RegistryPaths = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"
|
||||||
|
# Check if the path exists
|
||||||
|
if (-not (Test-Path $RegistryPaths)) {
|
||||||
|
# Create the path if it doesn't exist
|
||||||
|
New-Item -Path $RegistryPaths -Force | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
Set-ItemProperty -Path $RegistryPaths -Name "SubscribedContent-338389Enabled" -Value 0 -Force | Out-Null
|
||||||
|
|
||||||
|
Write-Host ""
|
||||||
|
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
# #
|
# #
|
||||||
# Control Panel #
|
# Control Panel #
|
||||||
# #
|
# #
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
|
|
||||||
Write-Host -ForegroundColor Yellow ">>> Change Control Panel View <<<"
|
Write-Host -ForegroundColor Yellow ">>> Change Control Panel View to 'Small icon'<<<"
|
||||||
|
|
||||||
# Set the registry paths for both HKLM and HKCU
|
|
||||||
$RegistryPaths = @(
|
$RegistryPaths = @(
|
||||||
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel",
|
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel",
|
||||||
"HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel"
|
"HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel"
|
||||||
@@ -261,33 +487,19 @@ $ControlPanelProperties = @{
|
|||||||
"StartupPage" = 1
|
"StartupPage" = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Iterate over each registry path
|
|
||||||
foreach ($RegistryPath in $RegistryPaths) {
|
foreach ($RegistryPath in $RegistryPaths) {
|
||||||
# Create the key if it does not exist
|
if (-NOT (Test-Path $RegistryPath)) {
|
||||||
If (-NOT (Test-Path $RegistryPath)) {
|
|
||||||
New-Item -Path $RegistryPath -Force | Out-Null
|
New-Item -Path $RegistryPath -Force | Out-Null
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set the values based on the hashtable
|
|
||||||
foreach ($Name in $ControlPanelProperties.Keys) {
|
foreach ($Name in $ControlPanelProperties.Keys) {
|
||||||
$Value = $ControlPanelProperties[$Name]
|
$Value = $ControlPanelProperties[$Name]
|
||||||
New-ItemProperty -Path $RegistryPath -Name $Name -Value $Value -PropertyType DWORD -Force | Out-Null
|
New-ItemProperty -Path $RegistryPath -Name $Name -Value $Value -Type DWORD -Force | Out-Null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
|
|
||||||
##########################################################################################
|
|
||||||
# #
|
|
||||||
# Welcome Experience #
|
|
||||||
# #
|
|
||||||
##########################################################################################
|
|
||||||
|
|
||||||
Write-Host -ForegroundColor Yellow ">>> Turn off Windows Welcome Experience <<<"
|
|
||||||
|
|
||||||
New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent" -Value "0" -Type DWORD -Force | Out-Null
|
|
||||||
Write-Host ""
|
|
||||||
|
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
# #
|
# #
|
||||||
# Edge #
|
# Edge #
|
||||||
@@ -296,80 +508,57 @@ Write-Host ""
|
|||||||
|
|
||||||
Write-Host -ForegroundColor Yellow ">>> Disable Microsoft Edge First Run Welcome Page <<<"
|
Write-Host -ForegroundColor Yellow ">>> Disable Microsoft Edge First Run Welcome Page <<<"
|
||||||
|
|
||||||
# Set the registry paths for both HKLM and HKCU
|
# Set the registry paths
|
||||||
$RegistryPaths = @(
|
$RegistryPaths = @(
|
||||||
"HKLM:\SOFTWARE\Policies\Microsoft\Edge",
|
"HKLM:\SOFTWARE\Policies\Microsoft\Edge",
|
||||||
"HKCU:\SOFTWARE\Policies\Microsoft\Edge"
|
"HKCU:\SOFTWARE\Policies\Microsoft\Edge"
|
||||||
)
|
)
|
||||||
|
|
||||||
# https://gist.github.com/asheroto/e18500e7d206f3ae99f9bd0da0cf6bc6
|
# https://gist.github.com/asheroto/e18500e7d206f3ae99f9bd0da0cf6bc6
|
||||||
# Create a hashtable to store the property names and their corresponding values
|
|
||||||
$EdgeProperties = @{
|
$EdgeProperties = @{
|
||||||
"NewTabPageHideDefaultTopSites" = 1
|
"AlternateErrorPagesEnabled" = 0
|
||||||
"HideFirstRunExperience" = 1
|
"ComposeInlineEnabled" = 0
|
||||||
"ShowRecommendationsEnabled" = 0
|
"CopilotCDPPageContext" = 0
|
||||||
"CopilotPageContext" = 0
|
"CopilotPageContext" = 0
|
||||||
|
"DefaultBrowserSettingsCampaignEnabled" = 0
|
||||||
|
"DiagnosticData" = 0
|
||||||
|
"EdgeCollectionsEnabled" = 0
|
||||||
|
"EdgeEntraCopilotPageContext" = 0
|
||||||
|
"EdgeHistoryAISearchEnabled" = 0
|
||||||
|
"EdgeShoppingAssistantEnabled" = 0
|
||||||
|
"GenAILocalFoundationalModelSettings" = 1
|
||||||
|
"HideFirstRunExperience" = 1
|
||||||
|
"HubsSidebarEnabled" = 0
|
||||||
"Microsoft365CopilotChatIconEnabled" = 0
|
"Microsoft365CopilotChatIconEnabled" = 0
|
||||||
"NewTabPageContentEnabled" = 0
|
"NewTabPageAllowedBackgroundTypes" = 3
|
||||||
"NewTabPageBingChatEnabled" = 0
|
|
||||||
"NewTabPageAppLauncherEnabled" = 0
|
"NewTabPageAppLauncherEnabled" = 0
|
||||||
"UserFeedbackAllowed" = 0
|
"NewTabPageBingChatEnabled" = 0
|
||||||
|
"NewTabPageContentEnabled" = 0
|
||||||
|
"NewTabPageHideDefaultTopSites" = 1
|
||||||
"PersonalizationReportingEnabled" = 0
|
"PersonalizationReportingEnabled" = 0
|
||||||
"PersonalizeTopSitesInCustomizeSidebarEnabled" = 0
|
"PersonalizeTopSitesInCustomizeSidebarEnabled" = 0
|
||||||
"EdgeCollectionsEnabled" = 0
|
|
||||||
"ShowMicrosoftRewards" = 0
|
|
||||||
"ShowAcrobatSubscriptionButton" = 0
|
"ShowAcrobatSubscriptionButton" = 0
|
||||||
"DefaultBrowserSettingsCampaignEnabled" = 0
|
"ShowMicrosoftRewards" = 0
|
||||||
"EdgeShoppingAssistantEnabled" = 0
|
"ShowRecommendationsEnabled" = 0
|
||||||
|
"TabServicesEnabled" = 0
|
||||||
|
"UserFeedbackAllowed" = 0
|
||||||
"VisualSearchEnabled" = 0
|
"VisualSearchEnabled" = 0
|
||||||
"NewTabPageAllowedBackgroundTypes" = 3
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Iterate over each registry path
|
# Iterate over each registry path
|
||||||
foreach ($RegistryPath in $RegistryPaths) {
|
foreach ($RegistryPath in $RegistryPaths) {
|
||||||
# Create the key if it does not exist
|
if (-NOT (Test-Path $RegistryPath)) {
|
||||||
If (-NOT (Test-Path $RegistryPath)) {
|
|
||||||
New-Item -Path $RegistryPath -Force | Out-Null
|
New-Item -Path $RegistryPath -Force | Out-Null
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set the values based on the hashtable
|
|
||||||
foreach ($Name in $EdgeProperties.Keys) {
|
foreach ($Name in $EdgeProperties.Keys) {
|
||||||
$Value = $EdgeProperties[$Name]
|
$Value = $EdgeProperties[$Name]
|
||||||
New-ItemProperty -Path $RegistryPath -Name $Name -Value $Value -PropertyType DWORD -Force | Out-Null
|
New-ItemProperty -Path $RegistryPath -Name $Name -Value $Value -Type DWORD -Force | Out-Null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
|
|
||||||
##########################################################################################
|
|
||||||
# #
|
|
||||||
# Export Registry #
|
|
||||||
# #
|
|
||||||
##########################################################################################
|
|
||||||
|
|
||||||
## Export the registry keys
|
|
||||||
#Write-Host -ForegroundColor DarkGray ">>> Exporting registry settings... <<<"
|
|
||||||
#
|
|
||||||
## Create a temporary folder for export
|
|
||||||
#$exportPath = "C:\temp"
|
|
||||||
#if (-Not (Test-Path $exportPath)) {
|
|
||||||
# New-Item -ItemType Directory -Path $exportPath | Out-Null
|
|
||||||
#}
|
|
||||||
#
|
|
||||||
#reg export "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "$exportPath\TaskbarSettings.reg" /y | Out-Null
|
|
||||||
#reg export "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" "$exportPath\SearchSettings.reg" /y | Out-Null
|
|
||||||
#
|
|
||||||
#Write-Host -ForegroundColor DarkGray ">>> Importing registry settings to Default Profile <<<"
|
|
||||||
#
|
|
||||||
## Copy the registry files to the default profile
|
|
||||||
#Copy-Item "$exportPath\TaskbarSettings.reg" "C:\Users\Default\Desktop"
|
|
||||||
#Copy-Item "$exportPath\SearchSettings.reg" "C:\Users\Default\Desktop"
|
|
||||||
#
|
|
||||||
## Remove the temporary folder
|
|
||||||
#Remove-Item -Path $exportPath -Recurse -Force
|
|
||||||
#
|
|
||||||
#Write-Host ""
|
|
||||||
|
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
# #
|
# #
|
||||||
# Power Plan #
|
# Power Plan #
|
||||||
@@ -378,10 +567,15 @@ Write-Host ""
|
|||||||
|
|
||||||
Write-Host -ForegroundColor Yellow ">>> Power Plan <<<"
|
Write-Host -ForegroundColor Yellow ">>> Power Plan <<<"
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
Write-Host -ForegroundColor DarkGray ">>> Activate High performance power plan <<<"
|
|
||||||
$powerPlan = Get-WmiObject -Namespace root\cimv2\power -Class Win32_PowerPlan -Filter "ElementName = 'High Performance'"
|
|
||||||
$powerPlan.Activate()
|
|
||||||
|
|
||||||
|
Write-Host -ForegroundColor DarkGray ">>> Activate High performance power plan <<<"
|
||||||
|
powercfg -setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
|
||||||
|
# Create ultimate powerscheme
|
||||||
|
powercfg -duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61 | Out-Null
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
|
||||||
|
Write-Host -ForegroundColor DarkGray ">>> Setting the monitor timeout to 10 minutes <<<"
|
||||||
# AC power
|
# AC power
|
||||||
powercfg -change -monitor-timeout-ac 10
|
powercfg -change -monitor-timeout-ac 10
|
||||||
powercfg -change -standby-timeout-ac 10
|
powercfg -change -standby-timeout-ac 10
|
||||||
@@ -394,6 +588,8 @@ powercfg -change -hibernate-timeout-dc 0
|
|||||||
powercfg -change -disk-timeout-dc 0
|
powercfg -change -disk-timeout-dc 0
|
||||||
powercfg /hibernate off
|
powercfg /hibernate off
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
|
||||||
# Set the power button behavior for AC power to "Shut down"
|
# Set the power button behavior for AC power to "Shut down"
|
||||||
Write-Host -ForegroundColor DarkGray ">>> Setting the power button behavior to 'Shut down' <<<"
|
Write-Host -ForegroundColor DarkGray ">>> Setting the power button behavior to 'Shut down' <<<"
|
||||||
powercfg -setacvalueindex SCHEME_CURRENT SUB_BUTTONS PBUTTONACTION 3
|
powercfg -setacvalueindex SCHEME_CURRENT SUB_BUTTONS PBUTTONACTION 3
|
||||||
@@ -404,13 +600,26 @@ Write-Host -ForegroundColor DarkGray ">>> Setting the sleep button behavior to '
|
|||||||
powercfg /SETACVALUEINDEX SCHEME_CURRENT SUB_BUTTONS SBUTTONACTION 0
|
powercfg /SETACVALUEINDEX SCHEME_CURRENT SUB_BUTTONS SBUTTONACTION 0
|
||||||
powercfg /SETDCVALUEINDEX SCHEME_CURRENT SUB_BUTTONS SBUTTONACTION 0
|
powercfg /SETDCVALUEINDEX SCHEME_CURRENT SUB_BUTTONS SBUTTONACTION 0
|
||||||
|
|
||||||
Write-Host -ForegroundColor DarkGray ">>> Disabling fast startup <<<"
|
####################################################################################################################################
|
||||||
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Power" -Name HiberbootEnabled -Value "0" -Force | Out-Null
|
|
||||||
|
# Disable Fast Startup
|
||||||
|
Write-Host -ForegroundColor DarkGray ">>> Disable fast startup <<<"
|
||||||
|
$RegistryPaths = "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Power"
|
||||||
|
# Check if the path exists
|
||||||
|
if (-not (Test-Path $RegistryPaths)) {
|
||||||
|
# Create the path if it doesn't exist
|
||||||
|
New-Item -Path $RegistryPaths -Force | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
Set-ItemProperty -Path $RegistryPaths -Name "HiberbootEnabled" -Value 0 -Force | Out-Null
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
|
||||||
Write-Host -ForegroundColor DarkGray ">>> Disable Energy-Efficient Ethernet <<<"
|
Write-Host -ForegroundColor DarkGray ">>> Disable Energy-Efficient Ethernet <<<"
|
||||||
$adapter = Get-NetAdapter | Where-Object { $_.Name -eq "Ethernet" }
|
$adapter = Get-NetAdapter | Where-Object { $_.Name -eq "Ethernet" }
|
||||||
Disable-NetAdapterPowerManagement -Name $adapter.Name -NoRestart
|
Disable-NetAdapterPowerManagement -Name $adapter.Name -NoRestart
|
||||||
Set-ItemProperty -Path ("HKLM:\SYSTEM\CurrentControlSet\Control\Class\{0}\{1}" -f "{4D36E972-E325-11CE-BFC1-08002BE10318}", $idNIC) -Name "PnPCapabilities" -Value "24" -Type DWORD -Force | Out-Null
|
Set-ItemProperty -Path ("HKLM:\SYSTEM\CurrentControlSet\Control\Class\{0}\{1}" -f "{4D36E972-E325-11CE-BFC1-08002BE10318}", $idNIC) -Name "PnPCapabilities" -Value "24" -Type DWORD -Force | Out-Null
|
||||||
|
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
|
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
@@ -420,8 +629,8 @@ Write-Host ""
|
|||||||
##########################################################################################
|
##########################################################################################
|
||||||
|
|
||||||
Write-Host -ForegroundColor Yellow ">>> Windows Update settings <<<"
|
Write-Host -ForegroundColor Yellow ">>> Windows Update settings <<<"
|
||||||
|
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
|
|
||||||
Write-Host -ForegroundColor DarkGray ">>> Enable 'Get updates for other Microsoft products' <<<"
|
Write-Host -ForegroundColor DarkGray ">>> Enable 'Get updates for other Microsoft products' <<<"
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -430,83 +639,29 @@ try {
|
|||||||
$UpdateServiceManager.AddService2($ServiceID, 7, "") | Out-Null
|
$UpdateServiceManager.AddService2($ServiceID, 7, "") | Out-Null
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
Write-Error "An error occurred while configuring Microsoft Update: $($_.Exception.Message)"
|
Write-Error -ForegroundColor Red "An error occurred while configuring Microsoft Update: $($_.Exception.Message)"
|
||||||
}
|
|
||||||
|
|
||||||
####################################################################################################################################
|
|
||||||
|
|
||||||
|
|
||||||
Write-Host -ForegroundColor DarkGray ">>> Set the notification behavior for updates to 'Do not show any notifications (excluding restart notifications)' <<<"
|
|
||||||
$RegistryPath = "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings"
|
|
||||||
$RegistryName = "ConfigureNotificationsForWU"
|
|
||||||
$RegistryValue = 0 # Do not show any notifications (excluding restart notifications)
|
|
||||||
|
|
||||||
# Explanation of values for ConfigureNotificationsForWU:
|
|
||||||
# 0: Do not show any notifications (excluding restart notifications)
|
|
||||||
# 1: Show standard notifications (includes restart alerts)
|
|
||||||
# 2: Notify for download and installation
|
|
||||||
# 3: Disable all notifications
|
|
||||||
|
|
||||||
try {
|
|
||||||
# Check if the registry path exists
|
|
||||||
if (-not (Test-Path -Path $RegistryPath)) {
|
|
||||||
Write-Warning "The registry path '$RegistryPath' does not exist."
|
|
||||||
Write-Host "Windows Update may need to be initialized."
|
|
||||||
exit
|
|
||||||
}
|
|
||||||
|
|
||||||
# Set the registry value
|
|
||||||
Set-ItemProperty -Path $RegistryPath -Name $RegistryName -Value $RegistryValue -Force
|
|
||||||
}
|
|
||||||
catch {
|
|
||||||
Write-Error "An error occurred while modifying the registry: $($_.Exception.Message)"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
####################################################################################################################################
|
####################################################################################################################################
|
||||||
|
|
||||||
# Set "Do not restart if user is logged on"
|
# Set "Do not restart if user is logged on"
|
||||||
Write-Host -ForegroundColor DarkGray ">>> Set 'Do not restart if user is logged on' <<<"
|
Write-Host -ForegroundColor DarkGray ">>> Set 'Do not restart if user is logged on' <<<"
|
||||||
# Define the value to disable automatic reboots when a user is logged on
|
|
||||||
$NoAutoRebootWithLoggedOnUsers = 1
|
|
||||||
$WindowsUpdateRegistryPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update"
|
$WindowsUpdateRegistryPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update"
|
||||||
|
|
||||||
# Check if the registry key exists, otherwise create it
|
|
||||||
if (!(Test-Path $WindowsUpdateRegistryPath)) {
|
if (!(Test-Path $WindowsUpdateRegistryPath)) {
|
||||||
New-Item -Path $WindowsUpdateRegistryPath -Force | Out-Null
|
New-Item -Path $WindowsUpdateRegistryPath -Force | Out-Null
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set the NoAutoRebootWithLoggedOnUsers value
|
Set-ItemProperty -Path $WindowsUpdateRegistryPath -Name "NoAutoRebootWithLoggedOnUsers" -Value 1 -Type DWORD | Out-Null
|
||||||
Set-ItemProperty -Path $WindowsUpdateRegistryPath -Name "NoAutoRebootWithLoggedOnUsers" -Value $NoAutoRebootWithLoggedOnUsers -Type DWORD | Out-Null
|
|
||||||
|
|
||||||
####################################################################################################################################
|
####################################################################################################################################
|
||||||
|
|
||||||
# Restart the Windows Update service to apply the change immediately
|
|
||||||
Restart-Service -Name "wuauserv" -Force | Out-Null
|
|
||||||
|
|
||||||
# Restart File Explorer to apply the changes
|
# Restart File Explorer to apply the changes
|
||||||
taskkill /f /im explorer.exe | Out-Null
|
taskkill /f /im explorer.exe | Out-Null
|
||||||
|
|
||||||
start explorer.exe | Out-Null
|
start explorer.exe | Out-Null
|
||||||
|
|
||||||
##########################################################################################
|
|
||||||
# #
|
|
||||||
# Available Updates #
|
|
||||||
# #
|
|
||||||
##########################################################################################
|
|
||||||
|
|
||||||
# Checking for Available Updates
|
|
||||||
Install-Module -Name PSWindowsUpdate -Force -Confirm:$False
|
|
||||||
Write-Host ""
|
|
||||||
Write-Host -ForegroundColor Yellow ">>> Checking for Available Updates... <<<"
|
|
||||||
Get-WindowsUpdate
|
|
||||||
Write-Host ""
|
|
||||||
|
|
||||||
# Installing Windows Updates
|
|
||||||
Write-Host -ForegroundColor Yellow ">>> Installing Windows Updates... <<<"
|
|
||||||
Install-WindowsUpdate -AcceptAll -Force -Verbose -NoReboot
|
|
||||||
|
|
||||||
# Monitoring Update Installation
|
|
||||||
# Write-Host ""
|
|
||||||
# Get-WindowsUpdateLog
|
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
|
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
@@ -521,33 +676,62 @@ Write-Host ""
|
|||||||
# Get the directory of the currently executing script
|
# Get the directory of the currently executing script
|
||||||
$scriptDirectory = Split-Path -Parent $MyInvocation.MyCommand.Path
|
$scriptDirectory = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||||
|
|
||||||
# Construct the path to the bloatware-apps.txt file
|
# bloatware.txt path
|
||||||
$appsToRemove = Get-Content (Join-Path $scriptDirectory "bloatware-apps.txt")
|
$appsToRemove = Get-Content (Join-Path $scriptDirectory "bloatware.txt")
|
||||||
|
|
||||||
# Remove the specified apps from the list
|
# Remove the specified apps from the list
|
||||||
foreach ($app in $appsToRemove) {
|
foreach ($app in $appsToRemove) {
|
||||||
try {
|
try {
|
||||||
winget uninstall --name $app
|
winget uninstall --name $app | Out-Null
|
||||||
Write-Host "Removed: $app"
|
# Check if the app was removed successfully
|
||||||
|
if ($LASTEXITCODE -eq 0) {
|
||||||
|
Write-Host "Removed: $app"
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Host "Not found: $app"
|
||||||
|
}
|
||||||
} catch {
|
} catch {
|
||||||
Write-Host "Error removing: $app. Details: $_"
|
Write-Host -ForegroundColor Red "Error removing: $app. Details: $_"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host -ForegroundColor Yellow ">>> Uninstallation of Microsoft Office <<<"
|
####################################################################################################################################
|
||||||
|
|
||||||
|
# Disable Microsoft 365 Ads in Settings Home
|
||||||
|
$RegistryPaths = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent"
|
||||||
|
# Create the path if it doesn't exist
|
||||||
|
if (-not (Test-Path $RegistryPaths)) {
|
||||||
|
New-Item -Path $RegistryPaths -Force
|
||||||
|
}
|
||||||
|
# Set the registry value to disable ads
|
||||||
|
Set-ItemProperty -Path $RegistryPaths -Name "DisableConsumerAccountStateContent" -Value 1 -Type DWORD -Force | Out-Null
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
|
||||||
|
# Uninstall Microsoft Office
|
||||||
|
Write-Host ""
|
||||||
|
Write-Host -ForegroundColor Yellow ">>> Uninstall Microsoft Office <<<"
|
||||||
Start-Process "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" "https://aka.ms/SaRA-officeUninstallFromPC"
|
Start-Process "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" "https://aka.ms/SaRA-officeUninstallFromPC"
|
||||||
|
|
||||||
|
##########################################################################################
|
||||||
|
# #
|
||||||
|
# SOFTWARE #
|
||||||
|
# #
|
||||||
|
##########################################################################################
|
||||||
|
|
||||||
|
# https://winstall.app/ - Browse the winget repository
|
||||||
|
|
||||||
|
Write-Host ""
|
||||||
|
Write-Host -ForegroundColor Yellow ">>> Upgrade packages... <<<"
|
||||||
|
Write-Host ""
|
||||||
|
winget upgrade --all
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
|
|
||||||
# >>>>>> https://pureinfotech.com/windows-11-policy-remove-bloatware/ <<<<<<
|
Write-Host -ForegroundColor Yellow ">>> Install default SOFTWARE... <<<"
|
||||||
Write-Host -ForegroundColor Yellow ">>> From Windows 24H2, enable the policy "
|
|
||||||
Write-Host ""
|
|
||||||
Write-Host -ForegroundColor Magenta "Computer Configuration > Administrative Templates > Windows Components > App Package Deployment > 'Remove Default Microsoft Store packages from the system' "
|
|
||||||
Write-Host ""
|
|
||||||
Write-Host -ForegroundColor Yellow "to prevent bloatware from being installed for every user... <<<"
|
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
|
winget install --disable-interactivity SumatraPDF.SumatraPDF Microsoft.Edit Notepad++.Notepad++ 7zip.7zip Mozilla.Firefox Flameshot.Flameshot DuongDieuPhap.ImageGlass Microsoft.PowerToys Seelen.SeelenUI voidtools.Everything Flow-Launcher.Flow-Launcher WinDirStat.WinDirStat --source winget
|
||||||
|
|
||||||
# Sleep for 30 seconds
|
Write-Host ""
|
||||||
Start-Sleep -Seconds 60
|
|
||||||
|
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
# #
|
# #
|
||||||
|
|||||||
Reference in New Issue
Block a user