Windows 10: Update and Upgrade Windows 10 using PowerShell

Discus and support Update and Upgrade Windows 10 using PowerShell in Windows 10 Tutorials to solve the problem; How to: Update and Upgrade Windows 10 using PowerShell [img] Information Since its birth in November 2006 PowerShell has evolved to be the chosen... Discussion in 'Windows 10 Tutorials' started by Kari, Apr 14, 2017.

  1. Kari Win User

    Update and Upgrade Windows 10 using PowerShell


    How to: Update and Upgrade Windows 10 using PowerShell

    Update and Upgrade Windows 10 using PowerShell [​IMG]
    Information Since its birth in November 2006 PowerShell has evolved to be the chosen tool of network administrators and advanced users alike. Originally a native Windows tool it has since August 2016 been an open source project, spreading its wings to other operating systems, too, starting with Linux.

    According to Wikipedia "PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language built on the .NET Framework".

    PowerShell is often falsely thought to be a Command Prompt replacement users reading wrong changes in late Windows 10 versions where PowerShell by default replaced Command Prompt in WIN + X menu; however, both have their own purpose and areas of expertise, both are and will remain integral parts of Windows 10.

    PowerShell should not be feared, it can make administrative and maintenance tasks of a private user even with just a single PC a piece of cake with its logical cmdlets (pronounced command let) and a relatively easy to learn scripting language.

    The cmdlet syntax is VERB-NOUN, always answering the question Do what? Add some parameters and you have a powerful command, like for instance Hide-WUUpdate -KBArticleID "KB1234567" as used later in this tutorial. Easy to understand: Hide (do not show / install) an update with knowledge base ID 1234567.

    This tutorial will show how to take command of Windows Update using PowerShell. Tutorial will cover the basics, feel free to post in this thread if you have any questions.




    Contents [/i] Click links to jump to any part

    [table][tr][td]Part One:[/td] [td]Install Windows Update Module for PowerShell[/td] [/tr] [tr][td]Part Two:[/td] [td]Add support for additional Microsoft Products[/td] [/tr] [tr][td]Part Three:[/td] [td]Check, Install or Hide Windows Updates[/td] [/tr] [tr][td]Part Four:[/td] [td]Check Update History, Uninstall an Update[/td] [/tr] [tr][td]Part Five:[/td] [td]Get Help[/td] [/tr] [/table]




    Part One [/i] Install PowerShell Windows Update Module
    1.1)
    Download PSWindowsUpdate.zip from Microsoft TechNet:

    Download

    1.2) Right click the downloaded file, select Extract all:

    Update and Upgrade Windows 10 using PowerShell [​IMG]


    1.3) Extract ZIP archive to C:\Windows\System32\WindowsPowerShell\v1.0\Modules

    Update and Upgrade Windows 10 using PowerShell [​IMG]


    1.4) Select Do this for all current items, click Continue:

    Update and Upgrade Windows 10 using PowerShell [​IMG]


    1.5) Open an elevated (admin) PowerShell, change script execution policy from default Restricted to Unrestricted with following cmdlet:

    Set-ExecutionPolicy Unrestricted -Scope CurrentUser

    Accept with Y. When done, import PSWindowsUpdate module with cmdlet:

    Import-Module PSWindowsUpdate

    Allow PSWindowsUpdate by selecting R (Run). This will be asked twice, separately for two PSWindowsUpdate scripts.

    Update and Upgrade Windows 10 using PowerShell [​IMG]


    1.6) You can get a list of each available PSWindowsUpdate cmdlet with

    Get-Command -Module PSWindowsUpdate

    Update and Upgrade Windows 10 using PowerShell [​IMG]





    Part Two [/i] Add support for additional Microsoft Products
    2.1)
    In Settings App > Update & Security > Windows Update > Advanced Options you can select to get updates to other Microsoft products when updating Windows. To add the same functionality to PSWindowsUpdate run the following cmdlet:

    Add-WUServiceManager -ServiceID 7971f918-a847-4430-9279-4a52d1efe18d

    Update and Upgrade Windows 10 using PowerShell [​IMG]


    Accept with Y. Notice that the ServiceID is constant string, exactly as shown above

    This step is completely optional; if you do not Windows Update updating other products than Windows, simply skip it.




    Part Three [/i] Check, Install or Hide Windows Updates
    3.1) To list all Windows and other Microsoft updates, enter the following cmdlet:

    Get-WUInstall -MicrosoftUpdate -ListOnly


    Update and Upgrade Windows 10 using PowerShell [​IMG]


    In this case there were only updates for Windows available.

    3.2) To check available updates and feature upgrades for Windows only (not for additional Microsoft products) enter cmdlet:

    Get-WUInstall -ListOnly

    Update and Upgrade Windows 10 using PowerShell [​IMG]

    (Screenshot shows cmdlets for steps 3.2 to 3.6)

    3.3) To hide an update you do not want to install you can filter with either full or partial title of an update, or its KB ID

    3.4) Hide update Microsoft Silverlight (KB4013867) using partial title Microsoft:

    Hide-WUUpdate -Title "Microsoft*" -Confirm:$False

    This hides all updates where word Microsoft appears anywhere in update title. In my example case now the Silverlight update was the only one.

    3.5) Hide the same update using KB ID instead of title:

    Hide-WUUpdate -KBArticleID "KB4013867" -Confirm:$False

    3.6) Same filters, title or KB ID can be used to unhide an update adding parameter -HideStatus:$False

    Hide-WUUpdate -Title "Microsoft*" -HideStatus:$False -Confirm:$False

    -- OR --

    Hide-WUUpdate -KBArticleID "KB4013867" -HideStatus:$False -Confirm:$False

    3.7) To install all available, not hidden updates rejecting or accepting each installation manually, use this cmdlet:

    Get-WUInstall

    To also install additional Microsoft product updates:

    Get-WUInstall -MicrosoftUpdate

    3.8) You need to manually accept (Y) or reject (N) each update. When done, if a restart is required you will be asked to accept (Y) or postpone (N) it:

    Update and Upgrade Windows 10 using PowerShell [​IMG]


    3.9) You can always check if restart is pending and required with

    Get-WURebootStatus

    Update and Upgrade Windows 10 using PowerShell [​IMG]


    3.10) To automatically accept all updates to be installed add parameter -AcceptAll. To automatically accept a restart if required you can also add -AutoReboot:

    Get-WUInstall -MicrosoftUpdate -AcceptAll -AutoReboot

    Update and Upgrade Windows 10 using PowerShell [​IMG]



    Update and Upgrade Windows 10 using PowerShell [​IMG]
    Warning When using -AutoReboot switch, avoid working with sensitive, important documents while PSWindowsUpdate is updating Windows.

    AutoReboot does not give any warning; when updates / upgrades have been initialized Windows will restart without warning causing loss of all unsaved data.

    3.11) Feature upgrades like for instance Windows Insider builds are shown and can be hidden or unhidden exactly as any other update. Notice that for reasons unknown to me feature upgrade sizes are shown wrong, for instance Build 16170 upgrade is under 3 GB download, not almost 150 GB as PSWindowsUpdate shows:

    Update and Upgrade Windows 10 using PowerShell [​IMG]



    Update and Upgrade Windows 10 using PowerShell [​IMG]
    Note Notice that when installing a build upgrade with PSWindowsUpdate, restart does not yet finalize upgrade. When you have restarted from PowerShell after PSWindowsUpdate has downloaded and installed build upgrade, it is in fact only initialized, not installed.

    You must restart once more from Start > Power > Update and restart




    Part Four [/i] Check Update History, Uninstall an Update
    4.1)
    To check your update history use following cmdlet:

    Get-WUHistory

    4.2) Uninstall an update using either its title or KB ID as shown in steps 3.4 & 3.5:

    Get-WUUninstall -KBArticleID "KB4013867" -Confirm:$False

    -- OR --

    Get-WUUninstall -Title "Microsoft Silverlight*" -Confirm:$False

    Update and Upgrade Windows 10 using PowerShell [​IMG]





    Part Five [/i] Get Help
    5.1)
    To get help, correct command syntax and examples about usage of a cmdlet, normal PowerShell help is available.

    For instance to get help with Hide-WUUpdate cmdlet enter the following cmdlet:

    Get-Help Hide-WUUpdate

    Notice that when Get-Help is run first time it needs to be updated (cmdlet Update-Help run). Accept it with Y, this is one time only process not required with further use of Get-Help cmdlet:

    Update and Upgrade Windows 10 using PowerShell [​IMG]


    That's it geeks! Please post all your concerns, questions and issues with PSWindowsUpdate in this thread.

    Kari



    Related Tutorials

    :)
     

  2. Windows 10 Mail

    Try re-registering the app.

    Open Start, type: powershell

    Right click PowerShell

    Click Run as administrator

    Type the following command then hit Enter, exit PowerShell then restart, then try updating through the Store again.

    Get-AppXPackage | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\AppXManifest.xml”}

    If the problem persists, I recommend performing a repair upgrade.

    Download the Windows 10 1703 ISO:

    http://windowsiso.net/windows-10-iso/windows-10...

    then

    http://answers.microsoft.com/en-us/insider/wiki...
     
    Andre Da Costa, Apr 14, 2017
    #2
  3. Windows 10 start menu tiles not working

    Do this:

    Make sure Windows 10 is fully updated.

    Check the Store for the latest updates for your apps.

    Reinstall all Windows Store apps:

    Open Start, type: powershell

    Right click PowerShell

    Click Run as administrator

    Type the following command then hit Enter, exit PowerShell then restart, then try updating through the Store again.

    Get-AppXPackage | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\AppXManifest.xml”}

    Restart then check again.

    If that does not work, perform a repair upgrade:

    http://answers.microsoft.com/en-us/insider/wiki...
     
    Andre Da Costa, Apr 14, 2017
    #3
  4. cereberus Win User

    Update and Upgrade Windows 10 using PowerShell

    One observation I have is that I have had to disable driver updates using gpedit.msc (Pro N) as the latest broadcom wifi drives was causing BSODs, but when I run get-wuinstall, it still lists the driver and I have to decline it each time.

    Is there a way around this?
     
    cereberus, Apr 14, 2017
    #4
  5. Kari Win User
    Have you hidden it with Hide-WUUpdate?
     
  6. Kari Win User
    I just love the simplicity of PSWindowsUpdate! Fresh clean install of version 1703, run the updates, get coffee and come back to updated Windows 10.

    Update and Upgrade Windows 10 using PowerShell [​IMG]
     
  7. cereberus Win User
    I will try that.
     
    cereberus, Apr 17, 2017
    #7
  8. Kari Win User

    Update and Upgrade Windows 10 using PowerShell

    See steps 3.3 through 3.6 for how to hide an update. It should work.
     
  9. cereberus Win User
    Thanks
     
    cereberus, Apr 4, 2018
    #9
Thema:

Update and Upgrade Windows 10 using PowerShell

Loading...
  1. Update and Upgrade Windows 10 using PowerShell - Similar Threads - Update Upgrade using

  2. How to find Windows Update Size using PowerShell

    in Windows 10 News
    How to find Windows Update Size using PowerShell: [ATTACH]If you want to find Windows Update size using PowerShell, here is how you can do that. Although Windows Settings could do it easily, you can use PowerShell to do the same within moments. For that, you need to install a script as there is no in-built PowerShell command...
  3. How to Hide Windows Updates using PowerShell in Windows 10

    in Windows 10 News
    How to Hide Windows Updates using PowerShell in Windows 10: Windows Updates are a way to increase your computer’s performance, add features, and optimize it for better (or for worse). However, sometimes you may want to hide these updates to stop them from being installed on your computer. Microsoft did offer a Hide Windows Updates...
  4. Upgrade to Windows 10 version 21H1 Update using Windows 10 Update Assistant

    in Windows 10 News
    Upgrade to Windows 10 version 21H1 Update using Windows 10 Update Assistant: The rollout for the next is still some days away but if you can’t resist the urge of getting your hands on the latest version of Windows 10 on your Windows 10 device, you can download it using Windows 10 Update Assistant. Windows 10 Update Assistant can help you configure...
  5. Trying to Hide a Windows 10 Update using Powershell

    in Windows 10 Installation and Upgrade
    Trying to Hide a Windows 10 Update using Powershell: [ATTACH] [ATTACH]Powershell command is not being accepted. Please help https://answers.microsoft.com/en-us/windows/forum/all/trying-to-hide-a-windows-10-update-using/88a2bbaf-1e58-4182-a854-8d488f52e120
  6. Updating Windows 10 through Powershell

    in Windows 10 Installation and Upgrade
    Updating Windows 10 through Powershell: I was just wondering if Windows 10 can be directy updated through Powershell without navigating through Settings> Update and Security. Is there a particular command that I can directly type and enter in powershell to update windows?...
  7. PowerShell Update

    in Windows 10 Support
    PowerShell Update: Hello everyone, I was trying to work through the instructional "Powershell Scripting - The Basics" and ran into a problem. When I try to even run Start-VM I get this error. [img] And then, when I try to update my Powershell on the web I get this. [img] I am hoping...
  8. Upgrade Windows 10 Pro to Windows Enterprise using either a PowerShell or Batch script

    in Windows 10 Updates and Activation
    Upgrade Windows 10 Pro to Windows Enterprise using either a PowerShell or Batch script: Looking for guidance and assistance upgrading a number of devices in my companies environment from Windows 10 Pro to Windows 10 Enterprise. Has anyone pushed the updates using either a PowerShell script or Batch?...
  9. How to upgrade PowerShell

    in Windows 10 Software and Apps
    How to upgrade PowerShell: Now when I launch PowerShell Core, v7.0.2 from Windows Terminal I will see this message: A new PowerShell stable release is available: v7.0.3 Upgrade now, or check out the release page at: https://aka.ms/PowerShell-Release?tag=v7.0.3 How can I 'upgrade now'? I do not...
  10. Upgrade to Windows 10 using Windows Update

    in Windows 10 Tutorials
    Upgrade to Windows 10 using Windows Update: Windows 10 was officially launched for public on 29th July 2015 as a free upgrade for existing Windows 7 and Windows 8.1 users. It is also available to purchase as a stand-alone version from the Microsoft Store and is pre-installed on most of the OEM if you purchase a new...

Users found this page by searching for:

  1. upgrading windows 10 using powershell

    ,
  2. powershell stable release is available v7.3.3 update version windows

    ,
  3. upgrade windows 10 1903 powershell

    ,
  4. update windows 10 using powershell,
  5. update and upgrade windows in powershell,
  6. use powershell to upgrade every driver on my Windows 10 machine,
  7. upgrade to windows 10 via powershell