Attachment 'Blocca-win11.ps1'
Download 1 # Self-elevate the script if required
2 if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) {
3 $CommandLine = "-NoProfile -ExecutionPolicy Bypass -File `"" + $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments
4 # Set-ExecutionPolicy
5 Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CommandLine
6 Exit
7 }
8
9
10
11 # blocca a windows 10 versione 22H2 massimo
12 reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate /f /v TargetReleaseVersion /t REG_DWORD /d 1
13 reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate /f /v TargetReleaseVersionInfo /t REG_SZ /d 22H2
14 reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate /f /v ProductVersion /t REG_SZ /d "Windows 10"
15 reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate /f /v DisableOSUpgrade /t REG_DWORD /d 1
16
17 # fai credere che ho rifiutato manualmente windows 11
18 reg add HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings /f /v SvOfferDeclined /t REG_QWORD /d 1
19
20 # blocca l'upgrade dal microsoft store
21 reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\OSUpgrade /f /v AllowOSUpgrade /t REG_DWORD /d 0
22 reg add HKLM\SOFTWARE\Policies\Microsoft\WindowsStore /f /v DisableOSUpgrade /t REG_DWORD /d 1
23
24 # disabilita la notifica all'utente
25 reg add HKLM\SYSTEM\Setup\UpgradeNotification /f /v UpgradeAvailable /t REG_DWORD /d 0
26
27 # Uninstall Windows PC Health Check
28 Start-Process -FilePath msiexec.exe -ArgumentList "/x {B1E7D0FD-7CFE-4E0C-A5DA-0F676499DB91} /qn" -Wait
29 # Prevent Windows PC Health Check install
30 reg add HKLM\SOFTWARE\Microsoft\PCHC /f /v PreviousUninstall /t REG_DWORD /d 1
31
32 Read-Host "Press any key to continue..."
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.