Windows Updates with PowerShell

Поделиться
HTML-код
  • Опубликовано: 27 окт 2024

Комментарии • 25

  • @benedictsimpson6953
    @benedictsimpson6953 4 года назад +1

    Very nice

  • @Datalore74
    @Datalore74 4 года назад +1

    I have been looking for something like this script for a long time now. Thanks for the good work. I just subscribed. Keep up the good work.

  • @M1dKnight1am
    @M1dKnight1am 4 года назад +1

    Sir, i love your video! i have a question.
    this command in particular.
    $Updates = "Critical Updates","Security Updates"
    Get-WindowsUpdate -AcceptAll -Verbose -Install -IgnoreReboot -Category $Updates
    I have 2 questions.
    Q1. does this mean that when the KB is already installed in the server it will not be installed again right?
    Q2. if the KB is not for that Particular server, it will not install or download it, am i correct?
    thanks so much and more power.
    i subbed.

    • @TomsTechShow
      @TomsTechShow  4 года назад

      This works just like regular windows updates, it if is already installed it does not re-install, it only installed updated that are required for that OS

    • @M1dKnight1am
      @M1dKnight1am 4 года назад

      @@TomsTechShow Thanks bro! Awesome! i can definitely use this for my prod or lab! have a great day!

  • @kumar-mi6bu
    @kumar-mi6bu 2 года назад

    Hey hi i give a challenge to you.
    Write powershell script for update a webconfig file in particular place based on given value (webconfig file in particular VM and inside a vm has c:documents\web.config )

  • @benedictsimpson6953
    @benedictsimpson6953 4 года назад

    Hi Tom, I don't see the Windows update powershell scripts on your BitBucket repository. Could you please help with this?
    Thanks again

    • @TomsTechShow
      @TomsTechShow  4 года назад

      They are in the general-scripts project folder. bitbucket.org/tomstechshow/general-scripts/src/master/ You need the files that say 'Add WU files'

  • @TheDmart1205
    @TheDmart1205 3 года назад

    What other categories are available options under $Updates = "Critical Updates","Security Updates"

    • @TomsTechShow
      @TomsTechShow  3 года назад +1

      This is the list defined in the PSWindowsUpdates scripts 'Critical Updates', 'Definition Updates', 'Drivers', 'Feature Packs', 'Security Updates', 'Service Packs', 'Tools', 'Update Rollups', 'Updates', 'Upgrades', 'Microsoft'

  • @M1dKnight1am
    @M1dKnight1am 4 года назад

    7:14
    Hi Tom its me again, referring to the timeline i posted above, do you have a script that pulls the server names from a .txt file then using that to declare on you $serverlist instead of the manual server name input? id like to see how you integrate that on this existing script you made.

    • @TomsTechShow
      @TomsTechShow  4 года назад +1

      There is a video on PowerShell ping and notify, which incorporates a Server text file as a source, you should be able to integrate that into the windows update scripts. ruclips.net/video/rkhKd_rUGuk/видео.html

    • @M1dKnight1am
      @M1dKnight1am 4 года назад

      @@TomsTechShow great! Ill look it up thank you!

  • @saradadoguparthi9896
    @saradadoguparthi9896 5 лет назад

    Hi Tom, thanks for the video.
    I tried to execute the PSTools\psexec command with parameters and it errors out to Import-Module PSTools.
    So I used the Import-Module command and gave exact path to this module.
    Import-Module 'C:\Program Files\WindowsPowerShell\Modules\PSTools\PsExec.exe'
    Error: ResourceUnavailable: (C:\Program File...ools\PsExec.exe:String)
    Any idea whats wrong with this? Am I in the right direction?

    • @TomsTechShow
      @TomsTechShow  5 лет назад

      You don't import the PSTools, that is run as an external command called through the Powershell command : Start-Process -FilePath wu-launch.bat -ArgumentList $server this then called that batch file. the wu-launch.bat file uses psexec to send the command to the remote computer to start the updates.

    • @saradadoguparthi9896
      @saradadoguparthi9896 5 лет назад

      Hi Tom, I was able to kick off the wu-launch.bat file from the Start-Process.
      The PsExec made the connection to the Server with the credentials and supposed to run the winupdate.bat file that is in the Domain controller/AD server, but looks like that's not happening. I see the message on the powershell window that "Starting cmd on the Server with Process ID" but no response after that. Any idea what is going on?

    • @TomsTechShow
      @TomsTechShow  5 лет назад

      I create a scripts folder on the server being updated and place the update batch file and the update powershell file there. If the powershell file is run at all you should see the transcript status.txt file.

    • @saradadoguparthi9896
      @saradadoguparthi9896 5 лет назад

      @@TomsTechShow Hi Tom, I see the status.txt file after I placed the update batch file and ps file in the scripts folder in the server that needs updates. Since the updates are not happening with the scripts, I had to separately run them and found out the scripts need elevated privileges at the server side that needs the updates. So how to do this included in the script when I kick off from the AD server. Any help is appreciated.
      VERBOSE: Accept [2] Updates to Download
      WARNING: Your security policy don't allow a non-administator identity to perform this task
      DONE
      Transcript stopped, output file is C:\Scripts\Status.txt

    • @TomsTechShow
      @TomsTechShow  5 лет назад

      @@saradadoguparthi9896 Hey there, The user that I use to remotely send the command is a Domain Admin and is in the Administrator group on the system being updated.

  • @abilash1664
    @abilash1664 4 года назад

    Will update heppens online with out sccm

    • @TomsTechShow
      @TomsTechShow  4 года назад

      Updates can be sourced from either Microsoft servers or a local Windows Update Server