Compare commits
20 Commits
60b4e73305
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3d219ccd50 | ||
|
|
fcbb34ea40 | ||
|
|
07e940bcdf | ||
|
|
56cc763c0e | ||
|
|
4dc59971a8 | ||
|
|
f5d540ea4b | ||
|
|
cbaac31ee8 | ||
|
|
b61933fc31 | ||
|
|
e355ea3263 | ||
|
|
b29c4dfa3b | ||
|
|
d6449f5d8a | ||
|
|
5462c96a01 | ||
|
|
293c025e62 | ||
|
|
a0fe8ff52a | ||
|
|
1b95401e61 | ||
|
|
3ee88aac48 | ||
|
|
7674c670e8 | ||
|
|
876a63c3d3 | ||
|
|
42562b8bec | ||
|
|
d627c54615 |
@@ -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
|
||||
643
configwinpc.ps1
643
configwinpc.ps1
@@ -1,8 +1,6 @@
|
||||
# https://github.com/andrew-s-taylor/public/blob/main/De-Bloat/RemoveBloat.ps1
|
||||
# https://github.com/marlock9/edge-debloat/blob/main/edge-debloat.reg
|
||||
|
||||
# TODO
|
||||
# export registry, supremo.exe, vendor bloatware
|
||||
# https://github.com/Raphire/Win11Debloat/tree/master/Regfiles
|
||||
|
||||
clear-Host
|
||||
|
||||
@@ -25,35 +23,8 @@ Write-Host -ForegroundColor Yellow "
|
||||
|
||||
"
|
||||
|
||||
# Sleep for 5 seconds
|
||||
Start-Sleep -Seconds 10
|
||||
|
||||
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 ""
|
||||
# Sleep for 2 seconds
|
||||
Start-Sleep -Seconds 2
|
||||
|
||||
##########################################################################################
|
||||
# #
|
||||
@@ -70,19 +41,16 @@ $RegistryPaths = @(
|
||||
"HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced",
|
||||
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced",
|
||||
"HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search",
|
||||
"HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer",
|
||||
"HKLM:\Software\Microsoft\Windows\CurrentVersion\Explorer"
|
||||
"HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer",
|
||||
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer"
|
||||
)
|
||||
|
||||
# Set left align
|
||||
Write-Host -ForegroundColor DarkGray ">>> Set left align <<<"
|
||||
foreach ($path in $RegistryPaths[0..1]) {
|
||||
New-ItemProperty -Path $path -Name "TaskbarAl" -Value 0 -Type DWORD -Force | Out-Null
|
||||
# Loop through each registry path to check if it exists
|
||||
foreach ($path in $RegistryPaths) {
|
||||
if (-not (Test-Path $path)) {
|
||||
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
|
||||
Write-Host -ForegroundColor DarkGray ">>> Hide TaskView button <<<"
|
||||
@@ -90,51 +58,118 @@ foreach ($path in $RegistryPaths[0..1]) {
|
||||
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
|
||||
Write-Host -ForegroundColor DarkGray ">>> Disable widgets in the taskbar <<<"
|
||||
Set-ItemProperty -Path $RegistryPaths[0] -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
|
||||
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[4] -Name "ShowWindowsW" -Value 0 | 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 -PropertyType DWORD -Force | Out-Null
|
||||
# Disable the widget service
|
||||
Write-Host -ForegroundColor DarkGray ">>> Disable widget service <<<"
|
||||
|
||||
$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) {
|
||||
New-ItemProperty -Path $path -Name "Start_IrisRecommendations" -Value 0 -Type DWORD -Force | Out-Null
|
||||
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
|
||||
####################################################################################################################################
|
||||
|
||||
# Enable End Task
|
||||
Write-Host -ForegroundColor DarkGray ">>> Enable End Task <<<"
|
||||
|
||||
$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 ""
|
||||
|
||||
# Define the registry paths for TaskbarDa
|
||||
$RegistryPaths = @(
|
||||
"HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced",
|
||||
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||
)
|
||||
|
||||
# Iterate over each registry path
|
||||
foreach ($taskbarDa_path in $RegistryPaths) {
|
||||
# Check if the TaskbarDa property exists and remove it if it does
|
||||
If (Test-Path "$taskbarDa_path\TaskbarDa") {
|
||||
Remove-ItemProperty -Path $taskbarDa_path -Name "TaskbarDa" -Force | Out-Null
|
||||
}
|
||||
}
|
||||
####################################################################################################################################
|
||||
|
||||
# Turn off web results in the Start menu
|
||||
Write-Host -ForegroundColor Yellow ">>> Turn off web results in the Start menu <<<"
|
||||
|
||||
reg add HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search /v SearchboxTaskbarMode /t REG_DWORD /d 0 /f
|
||||
reg add HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search /v BingSearchEnabled /t REG_DWORD /d 0 /f
|
||||
reg add HKCU\SOFTWARE\Policies\Microsoft\Windows\Explorer /v DisableSearchBoxSuggestions /t REG_DWORD /d 1 /f
|
||||
# Set the registry paths
|
||||
$RegistryPaths = @(
|
||||
"HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Search",
|
||||
"HKCU:SOFTWARE\Policies\Microsoft\Windows\Explorer"
|
||||
)
|
||||
|
||||
$Properties = @{
|
||||
"SearchboxTaskbarMode" = 0
|
||||
"BingSearchEnabled" = 0
|
||||
"DisableSearchBoxSuggestions" = 1
|
||||
}
|
||||
|
||||
# Iterate over each registry path
|
||||
foreach ($RegistryPath in $RegistryPaths) {
|
||||
# Create the key if it does not exist
|
||||
if (-NOT (Test-Path $RegistryPath)) {
|
||||
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 ""
|
||||
|
||||
##########################################################################################
|
||||
# #
|
||||
@@ -144,9 +179,9 @@ reg add HKCU\SOFTWARE\Policies\Microsoft\Windows\Explorer /v DisableSearchBoxSug
|
||||
|
||||
Write-Host -ForegroundColor Yellow ">>> Configure File Explorer <<<"
|
||||
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 ">>> Show file extensions in Explorer <<<"
|
||||
Write-Host -ForegroundColor DarkGray ">>> Show file extensions <<<"
|
||||
|
||||
# Set the registry paths for both HKLM and HKCU
|
||||
$RegistryPaths = @(
|
||||
@@ -161,55 +196,227 @@ $ExplorerProperties = @{
|
||||
"HideFileExt" = 0
|
||||
}
|
||||
|
||||
# Iterate over each registry path
|
||||
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
|
||||
}
|
||||
|
||||
# Set the values based on the hashtable
|
||||
foreach ($Name in $ExplorerProperties.Keys) {
|
||||
$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 #
|
||||
# #
|
||||
##########################################################################################
|
||||
|
||||
Write-Host ""
|
||||
Write-Host -ForegroundColor Yellow ">>> Disable Spotlight <<<"
|
||||
Write-Host ""
|
||||
|
||||
# Define registry paths for Windows Spotlight settings
|
||||
$RegistryPaths = @(
|
||||
"HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager",
|
||||
"HKLM:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager",
|
||||
"HKCU:\Software\Policies\Microsoft\Windows\CloudContent",
|
||||
"HKLM:\Software\Policies\Microsoft\Windows\CloudContent"
|
||||
"HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager",
|
||||
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager",
|
||||
"HKCU:\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
|
||||
Write-Host -ForegroundColor DarkGray ">>> Disabling Windows Spotlight on lockscreen <<<"
|
||||
foreach ($spotlight in $RegistryPaths[0..1]) {
|
||||
If (Test-Path $spotlight) {
|
||||
Set-ItemProperty -Path $spotlight -Name "RotatingLockScreenOverlayEnabled" -Value 0 -Force | Out-Null
|
||||
Set-ItemProperty -Path $spotlight -Name "RotatingLockScreenEnabled" -Value 0 -Force | Out-Null
|
||||
if (Test-Path $spotlight) {
|
||||
foreach ($Name in $LockScreenProperties.Keys) {
|
||||
$Value = $LockScreenProperties[$Name]
|
||||
Set-ItemProperty -Path $spotlight -Name $Name -Value $Value -Force | Out-Null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Disable Windows Spotlight on background
|
||||
Write-Host -ForegroundColor DarkGray ">>> Disabling Windows Spotlight on background <<<"
|
||||
foreach ($spotlight in $RegistryPaths[2..3]) {
|
||||
If (Test-Path $spotlight) {
|
||||
Set-ItemProperty -Path $spotlight -Name "DisableSpotlightCollectionOnDesktop" -Value 1 -Force | Out-Null
|
||||
Set-ItemProperty -Path $spotlight -Name "DisableWindowsSpotlightFeatures" -Value 1 -Force | Out-Null
|
||||
if (Test-Path $spotlight) {
|
||||
foreach ($Name in $BackgroundProperties.Keys) {
|
||||
$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 ""
|
||||
|
||||
##########################################################################################
|
||||
# #
|
||||
@@ -217,14 +424,13 @@ foreach ($spotlight in $RegistryPaths[2..3]) {
|
||||
# #
|
||||
##########################################################################################
|
||||
|
||||
Write-Host ""
|
||||
Write-Host -ForegroundColor Yellow ">>> Disable Notifications on Lock Screen <<<"
|
||||
|
||||
# Set the registry paths for notifications settings
|
||||
$RegistryPaths = @(
|
||||
"HKCU:\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"
|
||||
)
|
||||
|
||||
@@ -234,31 +440,42 @@ $NotificationProperties = @{
|
||||
"LockScreenToastEnabled" = 0
|
||||
}
|
||||
|
||||
# Iterate over each registry path
|
||||
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
|
||||
}
|
||||
|
||||
# Set the values based on the hashtable
|
||||
foreach ($Name in $NotificationProperties.Keys) {
|
||||
$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 -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 #
|
||||
# #
|
||||
##########################################################################################
|
||||
|
||||
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 = @(
|
||||
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel",
|
||||
"HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel"
|
||||
@@ -270,33 +487,19 @@ $ControlPanelProperties = @{
|
||||
"StartupPage" = 1
|
||||
}
|
||||
|
||||
# Iterate over each registry path
|
||||
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
|
||||
}
|
||||
|
||||
# Set the values based on the hashtable
|
||||
foreach ($Name in $ControlPanelProperties.Keys) {
|
||||
$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 ""
|
||||
|
||||
##########################################################################################
|
||||
# #
|
||||
# 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 #
|
||||
@@ -305,80 +508,57 @@ Write-Host ""
|
||||
|
||||
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 = @(
|
||||
"HKLM:\SOFTWARE\Policies\Microsoft\Edge",
|
||||
"HKCU:\SOFTWARE\Policies\Microsoft\Edge"
|
||||
)
|
||||
|
||||
# https://gist.github.com/asheroto/e18500e7d206f3ae99f9bd0da0cf6bc6
|
||||
# Create a hashtable to store the property names and their corresponding values
|
||||
$EdgeProperties = @{
|
||||
"NewTabPageHideDefaultTopSites" = 1
|
||||
"HideFirstRunExperience" = 1
|
||||
"ShowRecommendationsEnabled" = 0
|
||||
"AlternateErrorPagesEnabled" = 0
|
||||
"ComposeInlineEnabled" = 0
|
||||
"CopilotCDPPageContext" = 0
|
||||
"CopilotPageContext" = 0
|
||||
"DefaultBrowserSettingsCampaignEnabled" = 0
|
||||
"DiagnosticData" = 0
|
||||
"EdgeCollectionsEnabled" = 0
|
||||
"EdgeEntraCopilotPageContext" = 0
|
||||
"EdgeHistoryAISearchEnabled" = 0
|
||||
"EdgeShoppingAssistantEnabled" = 0
|
||||
"GenAILocalFoundationalModelSettings" = 1
|
||||
"HideFirstRunExperience" = 1
|
||||
"HubsSidebarEnabled" = 0
|
||||
"Microsoft365CopilotChatIconEnabled" = 0
|
||||
"NewTabPageContentEnabled" = 0
|
||||
"NewTabPageBingChatEnabled" = 0
|
||||
"NewTabPageAllowedBackgroundTypes" = 3
|
||||
"NewTabPageAppLauncherEnabled" = 0
|
||||
"UserFeedbackAllowed" = 0
|
||||
"NewTabPageBingChatEnabled" = 0
|
||||
"NewTabPageContentEnabled" = 0
|
||||
"NewTabPageHideDefaultTopSites" = 1
|
||||
"PersonalizationReportingEnabled" = 0
|
||||
"PersonalizeTopSitesInCustomizeSidebarEnabled" = 0
|
||||
"EdgeCollectionsEnabled" = 0
|
||||
"ShowMicrosoftRewards" = 0
|
||||
"ShowAcrobatSubscriptionButton" = 0
|
||||
"DefaultBrowserSettingsCampaignEnabled" = 0
|
||||
"EdgeShoppingAssistantEnabled" = 0
|
||||
"ShowMicrosoftRewards" = 0
|
||||
"ShowRecommendationsEnabled" = 0
|
||||
"TabServicesEnabled" = 0
|
||||
"UserFeedbackAllowed" = 0
|
||||
"VisualSearchEnabled" = 0
|
||||
"NewTabPageAllowedBackgroundTypes" = 3
|
||||
}
|
||||
|
||||
# Iterate over each registry path
|
||||
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
|
||||
}
|
||||
|
||||
# Set the values based on the hashtable
|
||||
foreach ($Name in $EdgeProperties.Keys) {
|
||||
$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 ""
|
||||
|
||||
##########################################################################################
|
||||
# #
|
||||
# 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 #
|
||||
@@ -387,10 +567,15 @@ Write-Host ""
|
||||
|
||||
Write-Host -ForegroundColor Yellow ">>> Power Plan <<<"
|
||||
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
|
||||
powercfg -change -monitor-timeout-ac 10
|
||||
powercfg -change -standby-timeout-ac 10
|
||||
@@ -403,6 +588,8 @@ powercfg -change -hibernate-timeout-dc 0
|
||||
powercfg -change -disk-timeout-dc 0
|
||||
powercfg /hibernate off
|
||||
|
||||
####################################################################################################################################
|
||||
|
||||
# Set the power button behavior for AC power to "Shut down"
|
||||
Write-Host -ForegroundColor DarkGray ">>> Setting the power button behavior to 'Shut down' <<<"
|
||||
powercfg -setacvalueindex SCHEME_CURRENT SUB_BUTTONS PBUTTONACTION 3
|
||||
@@ -413,13 +600,26 @@ Write-Host -ForegroundColor DarkGray ">>> Setting the sleep button behavior to '
|
||||
powercfg /SETACVALUEINDEX 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 <<<"
|
||||
$adapter = Get-NetAdapter | Where-Object { $_.Name -eq "Ethernet" }
|
||||
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
|
||||
|
||||
Write-Host ""
|
||||
|
||||
##########################################################################################
|
||||
@@ -429,8 +629,8 @@ Write-Host ""
|
||||
##########################################################################################
|
||||
|
||||
Write-Host -ForegroundColor Yellow ">>> Windows Update settings <<<"
|
||||
|
||||
Write-Host ""
|
||||
|
||||
Write-Host -ForegroundColor DarkGray ">>> Enable 'Get updates for other Microsoft products' <<<"
|
||||
|
||||
try {
|
||||
@@ -439,83 +639,29 @@ try {
|
||||
$UpdateServiceManager.AddService2($ServiceID, 7, "") | Out-Null
|
||||
}
|
||||
catch {
|
||||
Write-Error "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)"
|
||||
Write-Error -ForegroundColor Red "An error occurred while configuring Microsoft Update: $($_.Exception.Message)"
|
||||
}
|
||||
|
||||
####################################################################################################################################
|
||||
|
||||
# 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"
|
||||
|
||||
# Check if the registry key exists, otherwise create it
|
||||
if (!(Test-Path $WindowsUpdateRegistryPath)) {
|
||||
New-Item -Path $WindowsUpdateRegistryPath -Force | Out-Null
|
||||
}
|
||||
|
||||
# Set the NoAutoRebootWithLoggedOnUsers value
|
||||
Set-ItemProperty -Path $WindowsUpdateRegistryPath -Name "NoAutoRebootWithLoggedOnUsers" -Value $NoAutoRebootWithLoggedOnUsers -Type DWORD | Out-Null
|
||||
Set-ItemProperty -Path $WindowsUpdateRegistryPath -Name "NoAutoRebootWithLoggedOnUsers" -Value 1 -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
|
||||
taskkill /f /im 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 -Verbose -NoReboot
|
||||
|
||||
# Monitoring Update Installation
|
||||
# Write-Host ""
|
||||
# Get-WindowsUpdateLog
|
||||
Write-Host ""
|
||||
|
||||
##########################################################################################
|
||||
@@ -530,33 +676,62 @@ Write-Host ""
|
||||
# Get the directory of the currently executing script
|
||||
$scriptDirectory = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
|
||||
# Construct the path to the bloatware-apps.txt file
|
||||
$appsToRemove = Get-Content (Join-Path $scriptDirectory "bloatware-apps.txt")
|
||||
# bloatware.txt path
|
||||
$appsToRemove = Get-Content (Join-Path $scriptDirectory "bloatware.txt")
|
||||
|
||||
# Remove the specified apps from the list
|
||||
foreach ($app in $appsToRemove) {
|
||||
try {
|
||||
winget uninstall --name $app
|
||||
winget uninstall --name $app | Out-Null
|
||||
# Check if the app was removed successfully
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
Write-Host "Removed: $app"
|
||||
}
|
||||
else {
|
||||
Write-Host "Not found: $app"
|
||||
}
|
||||
} 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"
|
||||
|
||||
##########################################################################################
|
||||
# #
|
||||
# SOFTWARE #
|
||||
# #
|
||||
##########################################################################################
|
||||
|
||||
# https://winstall.app/ - Browse the winget repository
|
||||
|
||||
Write-Host ""
|
||||
Write-Host -ForegroundColor Yellow ">>> Upgrade packages... <<<"
|
||||
Write-Host ""
|
||||
winget upgrade --all
|
||||
Write-Host ""
|
||||
|
||||
# >>>>>> https://pureinfotech.com/windows-11-policy-remove-bloatware/ <<<<<<
|
||||
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 -ForegroundColor Yellow ">>> Install default SOFTWARE... <<<"
|
||||
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
|
||||
Start-Sleep -Seconds 60
|
||||
Write-Host ""
|
||||
|
||||
##########################################################################################
|
||||
# #
|
||||
|
||||
Reference in New Issue
Block a user