none
Powershell script to install updates RRS feed

  • Question

  • Hi Team,

    I want to trigger a script which can install monthly windows updates and share the result in output file.

    I am not that good with windows. Could you please help.

    Thank you

    Atul Chadha

    • Moved by Bill_Stewart Tuesday, August 9, 2016 8:19 PM This is not "scripts on demand"
    Monday, July 4, 2016 8:19 AM

All replies

  • Hi,

    For Windows Update PowerShell script, try this one. To log the activity, include something like this

    $Logfile = "C:\Logs\$(gc env:computername).log"
    
    Function LogWrite
    {
       Param ([string]$logstring)
    
       Add-content $Logfile -value $logstring
    }


    Best regards, Kjetil :) Please remember to click "Mark as Answer" on the post that helps you. This can be beneficial to other community members reading the thread.

    My blog

    • Proposed as answer by Kjetil Tonstad Sunday, November 13, 2016 6:15 PM
    Monday, July 4, 2016 8:25 AM
  • Hi Atul,

    sorry, but this is not a free scripting service, but a place where professionals share knowledge with each other. However, worry not, for there is a place where you might just find your answer:

    The script gallery

    There is a good module for windows update in there, which might contain your answer. Alternatively, you could forego scripting entirely, and simply use a WSUS Server (a role available on Windows Servers), which provides centralized update administration and excellent reporting.

    Cheers,
    Fred


    There's no place like 127.0.0.1

    Monday, July 4, 2016 8:32 AM