Windows Update PowerShell Module

This function is a piece of PSWindowsUpdate module to manage Windows Update on a computer system running Windows. Whole module contain set of functions to check, download and install updates from PowerShell.

4.6 Star
715,946 times
Add to favorites
Windows Update
E-mail Twitter Digg Facebook
Sign in to ask a question

  • Windows Update Reboot Issue
    1 Posts | Last post April 06, 2019
    • Hi,
      I have got a problem related to Get-WUInstall function. I found sometimes windows updates require the system to reboot multiple times. I use 
      Get-WUInstall –MicrosoftUpdate –AcceptAll –AutoReboot command to automatically upgrade system and reboot if it's required. Will this command continue to update windows OS after each reboot? If it does not, how can I handle this situation?
  • PSWindowsUpdate
    5 Posts | Last post April 05, 2019
    • Processing seems to stop at the very beginnig : "Connecting to Windows Update server. please wait...'
      I suppose, this nice script may need to get verified by some programmer with a lot more skills than me ;p
    • Hello, I'm also getting this. Been trying to find a solution...
    • same here...
    • same problem even with latest
    • We got update from MS they released one KB kb4489920 which fix this issue.
  • Set the Restart Time
    1 Posts | Last post March 24, 2019
    • Hi, after windows updates install on Windows 10, Windows will automatically select an ideal time to restart the device (i'm talking about a server in this case there really isn't ever an ideal time - because it's a server). so is there a way this script could set the restart time and date (we have a maintenance window we could use)? I have read through some of the com object stuff for windows update and i can't see any way to do this, unless it's set via some other means, maybe a scheduled task or something? i don't know, but it would be so useful to have that option.
  • Windows updates not working when we connect directly with windows update server
    1 Posts | Last post March 22, 2019
    • We stuck at connecting windows update server
  • Get-WUInstall using -usessl
    1 Posts | Last post March 21, 2019
    • is there any chance in the future to be able to run over https?
  • Push 1803 or 1809?
    1 Posts | Last post March 20, 2019
    • Has anyone been able to push feature updates? That's basically the only thing i want to do with it, but they don't show up when i list updates, but show up just fine if i use Windows Update.
  • Get-WindowsUpdate The type initializer for '<Module>' threw an exception
    3 Posts | Last post February 23, 2019
    • I'm getting this error and can't figure out what is going on. I have remoting enabled. I am logged into the computer as Domain\Administrator.
      PS C:\WINDOWS\system32>Get-WindowsUpdate -Verbose -ComputerName aus1
      VERBOSE: aus1 (2/19/2019 4:42:30 PM): Connecting to default for aus1. server. Please wait...
      VERBOSE: Found [6] Updates in pre search criteria
      Get-WindowsUpdate : The type initializer for '<Module>' threw an exception.
      At line:1 char:1
      + Get-WindowsUpdate -Verbose -ComputerName aus1
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : NotSpecified: (:) [Get-WindowsUpdate], TypeInitializationException
      + FullyQualifiedErrorId : System.TypeInitializationException,PSWindowsUpdate.GetWindowsUpdate
    • Forgot to mention running on Windows 2012 R2 with PowerShell 6.1.3
    • PowerShell combines command-line speed, the flexibility of scripting, and the power of a GUI-based admin tool. you can do anything with your windows machine using PowerShell, So if you are windows system administrator PowerShell is very important skill to have.
      let me give you share some things you can do with PowerShell. 
      Configure the complete networking on Windows: You can use PowerShell cmdlets to configure the IP addresses , dns servers etc. Look at Set-DnsClientServerAddress, Set-NetIPAddress , Set-NetIPInterface cmdlets.
      Schedule the Tasks on Windows: Consider you want to run an executable logon.exe whenever a user log in the computer.
      You can automate the task of running logon.exe using powershell cmdlets as shown below.
      $action = New-ScheduledTaskAction -Execute  "logon.exe" -Verbose
         $trigger = New-ScheduledTaskTrigger -Once -At Logon-Verbose
         Register-ScheduledTask -TaskName PERIODIC_LOG_COLLECTION -Trigger    $trigger -Action $action -description "logon_custom" -User "Adminsitartor" -RunLevel 1
          Set-ScheduledTask logon_custome -Trigger $trigger
      Manipulate the registries key on Windows: you can read, edit create and delete registry keys in windows using PowerShell cmdlets. get-itemproperty and Set-itempropperty can be used for these operations.
      Accessing WMI objects : WMI objects represent systems, applications, networks, devices, and other managed components. You can use PowerShell to manage them. Example:  Get-WmiObject -Class Win32_OperatingSystem -Namespace root/cimv2 -ComputerName .
      Remote Sessions in Windows: PowerShell is very power full tool manage Windows machine remotely. remote sessions in PowerShell is so seemless, it feels you are on the PowerShell session of local machine. 
      Note: I have not scratched the surface yet. There are lot more things you can do.
  • Error when trying to run Get-WUHISTORY
    1 Posts | Last post February 14, 2019
    • Hey All,
      When I run  Get-WUHistory -ComputerName Computer I get the error 
      Get-WUHistory : Computer: Connection failure, check firewall on destination machine.
      But I can run invoke-wujob and I can remote into the machine so I am not sure how the firewall is blocking this command.
  • SendReport to Gmail
    1 Posts | Last post February 14, 2019
    • I've not been able to get the -sendreport to work with or our internal relay.  What is the correct way to use this?  How can I send an email status report?
  • What does D mean in the status?
    2 Posts | Last post January 25, 2019
    • Hi, when I run Get-WindowsUpdate, it lists the available updates. One of them lists:
      What does that mean?
      Thank you
    • Downloaded
1 - 10 of 332 Items