Automation: Disabling Windows 10 Upgrade Through Windows Update Print E-mail
PowerShell
Written by Darwin Sanoy   
Sunday, February 7, 2016 8:45am

Recently Microsoft has changed the Windows 10 Upgraded in Windows Update to a "Recommended Update".  This dramatically expands the possibilities of some bad upgrade experiences for corporate users who do not realize the possible consequences of upgrading.  Here's a little automation to help you with that...

 

In order to prevent the Windows 10 upgrade you need to be sure a specific Windows Update is installed and then flip a group policy switch.  

  1. If your company is good about keeping up to date with Windows Updates and has group policy in place, then you are probably not reading this article - but if you are - then after verifying you have the Windows Update mentioned in the following article, just flip the group policy also mentioned: https://support.microsoft.com/en-us/kb/3080351.
  2. If you already use Chocolatey to manage your end points, then you can simply run the public chocolatey package I have prepared for this purpose.  Use this command line on all relevant computers: "choco install disable-windows10-upgrade -confirm" (no enclosing quotes).
  3. If you do not currently use Chocolatey, but would like to get it deployed, you can run the following oneliner in an elevated command prompt.  PLEASE BEWARE - it will: [a] Set your PowerShell Execution Policy to "RemoteSigned" and [b] Install the lightweight chocoloatey client.  You do not need PowerShell 5 - this approach should work fine all the way back to PowerShell 2.0.  After reviewing the code at this link: https://github.com/DarwinJS/ChocoPackages/blob/master/disable-windows10-upgrade/InstallChocoanddisable-windows10-upgrade.ps1, you can drop the following (very long) oneliner in an ELEVATED PowerShell prompt (make sure there are no line breaks): 

    [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {[bool]1};set-executionpolicy RemoteSigned -Force -EA 'SilentlyContinue';iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/DarwinJS/ ChocoPackages/master/disable-windows10-upgrade/ InstallChocoanddisable-windows10-upgrade.ps1'))

     
    Continue Reading on LinkedIn