Install Windows Updates from MS from PDQ Deploy

Comments

2 comments

  • Oamien Oliha

    Can you please share the package used ?

     

    1
    Comment actions Permalink
  • Kdave

    Sure:

    Create 3 powershell steps:

    Step 1, I wanted to enable option to get all other updates for other MS products.

    $ServiceManager = New-Object -ComObject "Microsoft.Update.ServiceManager"
    $ServiceManager.ClientApplicationID = "My App"
    $NewService = $ServiceManager.AddService2("7971f918-a847-4430-9279-4a52d1efe18d",7,"")

    Step 2, This step installs module PSwindowsupdate. It uses NuGet to download the package.

    Install-PackageProvider -Name NuGet -Force
    Install-Module pswindowsupdate -force
    Import-Module PSWindowsUpdate -force

    Step 3, This steps starts the install. I added option to not install feature update. It will download, install and reboot the desktop. It will put a log file on root of C:\

    Invoke-WUJob -ComputerName $env:COMPUTERNAME -force -runnow -confirm:$false -Script {ipmo PSWindowsUpdate; Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -NotKBArticleID "KB4601319", "KB5000802" -AutoREboot | Out-File C:\PSWindowsUpdate.log } -Verbose

    0
    Comment actions Permalink

Please sign in to leave a comment.