Taming Windows 10

I guess most people are terribly annoyed by Windows 10's nervious peculiarities: constant notifications about unimportant events, remote desktop firewall traps, sudden updates, very very very slow black notification windows at login etc..

I have here a list of things I do to my Windows 10 computers in a script after configuring a new one and every now and then to counteract MSFT believing that my computer is in fact their computer.


1. PowerShell scripts should run.

Set-ExecutionPolicy "Unrestricted" -Force -Confirm:$false


2. Windows should not beep at random moments. (What were they thinking??)

Set-ExecutionPolicy "Unrestricted" -Force -Confirm:$false


3. Windows should not annoy new user accounts with an endless black notification annoyance.

$pathSystemPolicies = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"

Set-ItemProperty $pathSystemPolicies EnableFirstLogonAnimation 0


4. Windows should stop showing notifications all the time.

$pathExplorerRegistry "HKLM:\Software\Policies\Microsoft\Windows\Explorer"

if (!(Test-Path $pathExplorerRegistry)) {

       New-Item -ItemType "Directory" $pathExplorerRegistry -Force

}#if

Set-ItemProperty $pathExplorerRegistry "DisableNotificationCenter" 1

$pathNotificationsRegistry "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.SecurityAndMaintenance"

if (!(Test-Path $pathNotificationsRegistry)) {

    New-Item -ItemType "Directory" $pathNotificationsRegistry -Force

}#if

Set-ItemProperty $pathNotificationsRegistry "Enabled" 0

$pathPushNotifications = "HKLM:\Software\Microsoft\Windows\CurrentVersion\PushNotifications"

Set-ItemProperty $pathPushNotifications "ToastEnabled" 0

 

5. Windows 10 should not download and install updates whenever it pleases.

$pathWindowsUpdateAU "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\"

if (!(Test-Path $pathWindowsUpdateAU)) {

       New-Item -ItemType Directory $pathWindowsUpdateAU -Force

}#if

Set-ItemProperty $pathWindowsUpdateAU" AUOptions" 1

Set-Service "wuauserv" -StartupType "Automatic"


6. Windows should not interfere with system administrators.

$pathSystemPolicies "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\"

Set-ItemProperty $pathSystemPolicies "EnableLUA" 0


7. When a program crashes, Windows should leave the user alone with his grief and not annoy him with questions.

$pathErrorReporting "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting"

if (!(Test-Path $pathErrorReporting)) {

       New-Item -ItemType Directory $pathErrorReporting -Force

}#if

Set-ItemProperty $pathErrorReporting"Disabled" 1


8. When the user tells Windows to restart, Windows should not discuss the matter with the user.

New-PSDrive -Name HKUSERS -PSProvider Registry -Root HKEY_USERS

$pathDesktop "HKUSERS:\.DEFAULT\Control Panel\Desktop\"

Set-ItemProperty $pathDesktop AutoEndTasks -Type String


9. Cortana can go and hide herself.

$sSearchService "wsearch"

$pathWindowsSearch "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search"

if (!(Test-Path $pathWindowsSearch)) {New-Item -ItemType Directory $pathWindowsSearch}

Set-ItemProperty $pathWindowsSearch"AllowCortana" 0

if (!((Get-Service $sSearchService).Status -eq "Running")) {

       Set-Service $sSearchService -StartupType "Automatic"

       Start-Service $sSearchService

}#if


10. Edge should not open random Web sites visited earlier, especially not those sites that made Edge crash the last time it was used.

$pathMicrosoftEdgeRecovery "HKLM:\Software\Policies\Microsoft\MicrosoftEdge\Recovery"

if (!(Test-Path $pathMicrosoftEdgeRecovery)) {

       New-Item -ItemType Directory $pathMicrosoftEdgeRecovery -Force

}#if

Set-ItemProperty $pathMicrosoftEdgeRecovery "AutoRecover" 2


11. User account passwords should not expire at random moments.

net accounts/maxpwage:UNLIMITED

Ok, I think that's it for the moment.

 

To install Windows updates I recommend using the PSWindowsUpdate PowerShell module. Install like this:

Install-PackageProvider -NameNuGet -MinimumVersion2.8.5.201 -Force-Confirm:0

Install-Module -NamePowerShellGet -MiniMumVersion2.1.2 -Force-Confirm:0

$sRepository ="PSGallery"

Set-PSRepository $sRepository -InstallationPolicy Trusted

Install-Module -Name"PSWindowsUpdate" -Repository $sRepository -MinimumVersion 2.1.1.1-Force -Confirm:0

 

 © Andrew Brehm 2016