Important Notice: On February 29th, this community will be put into read-only mode. All existing posts will remain but customers will be unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Install Windows Updates from MS from PDQ Deploy

I got tried of running windows update manually against MSFT when SCCM fails or when you want to deploy a new workstation and you need to run windows Update. I created a PDQ Deploy job that sets Windows update to get all update. You usually have to click on Advanced and set it to give me all patches. Next it downloads pswindowsupdate and imports the module and last step. It starts installing Windows update against MSFT. It created a log on C:\. I created a Tool in PDQ Inventory that can read the log so you can see what it installed. I added this step to new workstation build so it always leaves patched. This job has been working out great when we need to just run MS Updates. All it needs is internet access.

2

Comments

2 comments
Date Votes
  • Can you please share the package used ?

     

    1
  • 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

Please sign in to leave a comment.

Didn't find what you were looking for?

New post