Compare commits
10 Commits
a0fe8ff52a
...
testing
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
56cc763c0e | ||
|
|
4dc59971a8 | ||
|
|
f5d540ea4b | ||
|
|
cbaac31ee8 | ||
|
|
b61933fc31 | ||
|
|
e355ea3263 | ||
|
|
b29c4dfa3b | ||
|
|
d6449f5d8a | ||
|
|
5462c96a01 | ||
|
|
293c025e62 |
@@ -63,6 +63,7 @@ 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
|
||||
@@ -79,10 +80,10 @@ MarchofEmpires
|
||||
Microsoft 365 Copilot
|
||||
Microsoft 365 (Office)
|
||||
Microsoft Bing
|
||||
Microsoft Bing
|
||||
Microsoft Clipchamp
|
||||
Microsoft Edge Game Assist
|
||||
Microsoft News
|
||||
Microsoft Photos
|
||||
Microsoft Sticky Notes
|
||||
Microsoft Teams
|
||||
Microsoft To Do
|
||||
|
||||
210
configwinpc.ps1
210
configwinpc.ps1
@@ -4,9 +4,6 @@
|
||||
|
||||
clear-Host
|
||||
|
||||
# TODO
|
||||
# Optional Update, Delivery Optimization, Open With NP++
|
||||
|
||||
# Open PowerShell as administrator
|
||||
if (-Not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
|
||||
Start-Process powershell -ArgumentList "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs
|
||||
@@ -56,10 +53,10 @@ foreach ($path in $RegistryPaths) {
|
||||
}
|
||||
|
||||
# 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
|
||||
}
|
||||
#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
|
||||
#}
|
||||
|
||||
# Hide TaskView button
|
||||
Write-Host -ForegroundColor DarkGray ">>> Hide TaskView button <<<"
|
||||
@@ -352,6 +349,81 @@ foreach ($path in $registryPaths[2..3]) {
|
||||
|
||||
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 #
|
||||
@@ -385,6 +457,8 @@ foreach ($RegistryPath in $RegistryPaths) {
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
|
||||
####################################################################################################################################
|
||||
|
||||
Write-Host -ForegroundColor Yellow ">>> Disable Lets finish setting up your device <<<"
|
||||
@@ -432,47 +506,6 @@ foreach ($RegistryPath in $RegistryPaths) {
|
||||
|
||||
Write-Host ""
|
||||
|
||||
##########################################################################################
|
||||
# #
|
||||
# Suggestion #
|
||||
# #
|
||||
##########################################################################################
|
||||
|
||||
# Disable Windows notifications, suggestions, and ads
|
||||
Write-Host -ForegroundColor Yellow ">>> 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
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
|
||||
##########################################################################################
|
||||
# #
|
||||
# Edge #
|
||||
@@ -532,43 +565,6 @@ foreach ($RegistryPath in $RegistryPaths) {
|
||||
|
||||
Write-Host ""
|
||||
|
||||
##########################################################################################
|
||||
# #
|
||||
# Recall #
|
||||
# #
|
||||
##########################################################################################
|
||||
|
||||
Write-Host -ForegroundColor Yellow ">>> Disable Recall <<<"
|
||||
Write-Host ""
|
||||
|
||||
# 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 ""
|
||||
|
||||
##########################################################################################
|
||||
# #
|
||||
# Power Plan #
|
||||
@@ -667,45 +663,11 @@ Set-ItemProperty -Path $WindowsUpdateRegistryPath -Name "NoAutoRebootWithLoggedO
|
||||
|
||||
####################################################################################################################################
|
||||
|
||||
Write-Host -ForegroundColor Yellow ">>> Turn Off Windows Update Delivery Optimization <<<"
|
||||
|
||||
$RegistryPaths = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Settings"
|
||||
# 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 "DownloadMode" -Value 0 -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-PackageProvider -Name NuGet -Force
|
||||
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 and Driver Updates... <<<"
|
||||
Install-WindowsUpdate -AcceptAll -Install -IgnoreReboot
|
||||
Install-WindowsUpdate -Install -AcceptAll -UpdateType Driver -MicrosoftUpdate -ForceDownload -ForceInstall -IgnoreReboot
|
||||
Install-WindowsUpdate -Install -AcceptAll -UpdateType Software -MicrosoftUpdate -ForceDownload -ForceInstall -IgnoreReboot
|
||||
|
||||
Write-Host ""
|
||||
|
||||
##########################################################################################
|
||||
@@ -742,8 +704,6 @@ foreach ($app in $appsToRemove) {
|
||||
####################################################################################################################################
|
||||
|
||||
# Disable Microsoft 365 Ads in Settings Home
|
||||
Write-Host -ForegroundColor DarkGray ">>> Disabling Microsoft 365 Ads <<<"
|
||||
|
||||
$RegistryPaths = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent"
|
||||
# Create the path if it doesn't exist
|
||||
if (-not (Test-Path $RegistryPaths)) {
|
||||
@@ -756,7 +716,7 @@ Set-ItemProperty -Path $RegistryPaths -Name "DisableConsumerAccountStateContent"
|
||||
|
||||
# Uninstall Microsoft Office
|
||||
Write-Host ""
|
||||
Write-Host -ForegroundColor Yellow ">>> Uninstallation of Microsoft Office <<<"
|
||||
Write-Host -ForegroundColor Yellow ">>> Uninstall Microsoft Office <<<"
|
||||
Start-Process "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" "https://aka.ms/SaRA-officeUninstallFromPC"
|
||||
|
||||
##########################################################################################
|
||||
@@ -775,11 +735,9 @@ Write-Host ""
|
||||
|
||||
Write-Host -ForegroundColor Yellow ">>> Install default SOFTWARE... <<<"
|
||||
Write-Host ""
|
||||
winget install --disable-interactivity SumatraPDF.SumatraPDF Microsoft.Edit gnome.gedit Notepad++.Notepad++ 7zip.7zip Mozilla.Firefox Flameshot.Flameshot Microsoft.PowerToys --source winget
|
||||
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 --source winget
|
||||
|
||||
Ftype txt="C:\Program Files (x86)\Notepad++\notepad++.exe %1"
|
||||
|
||||
# Microsoft.PowerShell NodirTemirkhodjaev.FortFirewall voidtools.Everything Flow-Launcher.Flow-Launcher AutoHotkey.AutoHotkey Oracle.JavaRuntimeEnvironment Microsoft.VCRedist.2010.x64
|
||||
# Microsoft.PowerShell NodirTemirkhodjaev.FortFirewall AutoHotkey.AutoHotkey Oracle.JavaRuntimeEnvironment Microsoft.VCRedist.2010.x64
|
||||
|
||||
####################################################################################################################################
|
||||
|
||||
|
||||
Reference in New Issue
Block a user