Update and Upgrade Windows 10 using PowerShell  

Page 2 of 2 FirstFirst 12

  1. Posts : 10
    Windows 10 Home 64-bit
       19 Jul 2018 #10

    Sorry if I was not clear.

    What I want to do is to relegate as much routine computer activity (scans, backups, updates, etc.) as possible to the early hours of the morning while I am asleep. That is why I want it scheduled and completely non-interactive.

    I have written a small script program called Sleepless for Task Scheduler which wakes my laptop from sleep and invokes a custom power plan to prevent sleep/hibernation, dims the screen and runs a quick backup of some important files. It takes only a couple of minutes, but leaves the laptop ready to accept long, unattended, scheduled programs. On nights I want to run such programs, I leave the computer turned on (mains power) and in sleep mode. Sleepless kicks in at 1:50am and I schedule the unattended program/s from 2:00am onwards. The custom power plan stays in place until I click a desktop icon when I am ready, or restart or power off then on. I realise that update restarts may permit unwanted sleep from the normal Balanced power plan, but that could be set up differently.

    I've been doing this for malware scans, Windows Backup and System Image Backup for months, but had not thought of a way to include Windows Update until I saw the potential of PowerShell in this tutorial.

    Does the above background help you to advise whether the PowerShell Windows Update Module:

    a) Can do the job I want non-interactively via Task Scheduler?
    b) Contains all PS cmdlets needed?
    c) Would disable all other WU trigger sources, including WU itself?
    Or, d) Could be realised in better/simpler ways by a different approach?
    The link you supplied referred to the Windows Update MiniTool launched by the WUMT Wrapper Script. Is this a preferred approach or supplement? I do not understand the posts at the end of that link.

    If the PowerShell approach is the way to go, I would still be grateful for any advice you can provide on setting uo the script file for Task Scheduler.

    Apologies for my un-thought-through remarks about Active Hours.

      My ComputerSystem Spec

  2. Posts : 10
    Windows 10 Home 64-bit
       12 Aug 2018 #11

    Hi Kari

    I don't see a cmdlet to disable auto updates. Am I missing something?
      My ComputerSystem Spec

  3.    24 Aug 2018 #12

    Force windows updates on several workstations using Powershell

    Is there any way to force Windows updates on a list of computers using Powershell?
    Thank you!
      My ComputerSystem Spec

  4. Posts : 237
    Microsoft Windows 10 x64
       16 Nov 2018 #13

    Last version: https://www.powershellgallery.com/packages/PSWindowsUpdate/

    To install: Install-Module -Name PSWindowsUpdate
    To list commands: Get-Command -Module PSWindowsUpdate

     CommandType     Name                                               Version    Source
    -----------     ----                                               -------    ------
    Alias           Download-WindowsUpdate                       PSWindowsUpdate
    Alias           Get-WUInstall                                PSWindowsUpdate
    Alias           Get-WUList                                   PSWindowsUpdate
    Alias           Hide-WindowsUpdate                           PSWindowsUpdate
    Alias           Install-WindowsUpdate                        PSWindowsUpdate
    Alias           Show-WindowsUpdate                           PSWindowsUpdate
    Alias           UnHide-WindowsUpdate                         PSWindowsUpdate
    Alias           Uninstall-WindowsUpdate                      PSWindowsUpdate
    Cmdlet          Add-WUServiceManager                         PSWindowsUpdate
    Cmdlet          Enable-WURemoting                            PSWindowsUpdate
    Cmdlet          Get-WindowsUpdate                            PSWindowsUpdate
    Cmdlet          Get-WUApiVersion                             PSWindowsUpdate
    Cmdlet          Get-WUHistory                                PSWindowsUpdate
    Cmdlet          Get-WUInstallerStatus                        PSWindowsUpdate
    Cmdlet          Get-WUJob                                    PSWindowsUpdate
    Cmdlet          Get-WULastResults                            PSWindowsUpdate
    Cmdlet          Get-WURebootStatus                           PSWindowsUpdate
    Cmdlet          Get-WUServiceManager                         PSWindowsUpdate
    Cmdlet          Get-WUSettings                               PSWindowsUpdate
    Cmdlet          Get-WUTest                                   PSWindowsUpdate
    Cmdlet          Invoke-WUJob                                 PSWindowsUpdate
    Cmdlet          Remove-WindowsUpdate                         PSWindowsUpdate
    Cmdlet          Remove-WUServiceManager                      PSWindowsUpdate
    Cmdlet          Set-WUSettings                               PSWindowsUpdate
    Cmdlet          Update-WUModule                              PSWindowsUpdate

    To execute: Get-WindowsUpdate -Install -Verbose
    To list installed updates: Get-WUHistory
      My ComputerSystem Spec

Page 2 of 2 FirstFirst 12

Tutorial Categories

Update and Upgrade Windows 10 using PowerShell Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone

Related Threads
Hello, After updating from insider to 15063 and 15063.11 RTM powershell seems to be showing random symbols, but when I try to copy paste these symbols somewhere else they show up as normal text. In powershell I see this: 127506 After...
coming from linux (was using LXDE on arch)i have been used to the terminal and using the UI for everything is very unconformable (and slow)
Hi, I have a question about using Bitstransfer on powershell in order to download data via https. The following code works well on powershell 5.5 of windows 10 while it does not work on powershell 2.2 of windows 7. In particular, the problem...
After I updated to Windows 10 I get multiple "Powershell has stopped working" errors. How do I get rid of this error. Things I have tried: Downloaded Malwarebytes and ran scan - did not fix issue. Downloaded RegCurePro and ran scan - did not...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 16:23.
Find Us