OSDeploy / OSDBuilder

PowerShell Module
http://osdbuilder.com
MIT License
199 stars 57 forks source link

OSDBuilder not updating my WIN10 22H2 image with 2024-04 patches #100

Open mikkelandreasen opened 7 months ago

mikkelandreasen commented 7 months ago

Hi, This may be entirely du to my own lack of knowledge on the inner workings of the OSDBuilder...

I started working with OSDBuilder in early March and had great success in setting it up to automate image creation.

When the April patches came around I was anxious to see if it worked as expected. It did not. No new patches was downloaded so I ended up with an image identical to the March image. My scheduled script basically runs these commands

There's a bunch of other stuff as well but that's mostly logging and MDT stuff

OSDBuilder 23.2.21.1 | OSD 24.3.20.1
Home            D:\OSDBuilder
-Content        D:\OSDBuilder\Content
-ContentPacks   D:\OSDBuilder\ContentPacks
-FeatureUpdates D:\OSDBuilder\FeatureUpdates
-OSImport       D:\OSDBuilder\OSImport
-OSMedia        D:\OSDBuilder\OSMedia
-OSBuilds       D:\OSDBuilder\OSBuilds
-PEBuilds       D:\OSDBuilder\PEBuilds
-Mount          D:\OSDBuilder\Mount
-Tasks          D:\OSDBuilder\Tasks
-Templates      D:\OSDBuilder\Templates
-Updates        D:\OSDBuilder\Updates

Latest Updates:
22.2.19.1 Last Updated

Helpful Links:
22.2.19.1 Last Updated

New Links:
22.2.19.1 Last Updated

Shortcuts:
OSDBuilder -SetHome D:\OSDBuilder       Change OSDBuilder Home Path
OSDBuilder -CreatePaths                 Create OSDBuilder Directory Structure
OSDBuilder -Download OSMediaUpdates     Download missing Microsoft Updates for OSMedia
OSDBuilder -Download FeatureUpdates     Download Windows 10 and 11 Feature Updates for Import
OSDBuilder -Download OneDrive           Download the latest OneDriveSetup.exe
OSDBuilder -Download OneDriveEnterprise Download the latest OneDriveSetup.exe (Enterprise)
Import-OSMedia -Update                  Import and Update an OS (Downloads Updates)
Import-OSMedia -Update -BuildNetFX      Import, Update, and Build (NetFX) an OS (Downloads Updates)
Update-OSMedia -Download -Execute       Update an OS (Downloads Updates)

When updating the I see no now patches

PS C:\Users\administrator> OSDBuilder -Download OSMediaUpdates
OSDBuilder 23.2.21.1 | OSD 24.3.20.1
Home            D:\OSDBuilder
-Content        D:\OSDBuilder\Content
-ContentPacks   D:\OSDBuilder\ContentPacks
-FeatureUpdates D:\OSDBuilder\FeatureUpdates
-OSImport       D:\OSDBuilder\OSImport
-OSMedia        D:\OSDBuilder\OSMedia
-OSBuilds       D:\OSDBuilder\OSBuilds
-PEBuilds       D:\OSDBuilder\PEBuilds
-Mount          D:\OSDBuilder\Mount
-Tasks          D:\OSDBuilder\Tasks
-Templates      D:\OSDBuilder\Templates
-Updates        D:\OSDBuilder\Updates
VERBOSE: WSUSXML 24.3.20.1 Windows
========================================================================================
Update-OSMedia PROCESS
========================================================================================
Source OSMedia Windows Image Information
-OSMedia Path:              D:\OSDBuilder\OSImport\Windows 10 Pro x64 22H2 19045.2965 da-DK
-Image File:                D:\OSDBuilder\OSImport\Windows 10 Pro x64 22H2 19045.2965 da-DK\OS\sources\install.wim
-Name:                      Windows 10 Pro
-Description:               Windows 10 Pro
-Architecture:              x64
-Edition:                   Professional
-Type:                      Client
-Languages:                 da-DK
-Major Version:             10
-Build:                     19041
-Version:                   10.0.19041.2965
-SPBuild:                   2965
-SPLevel:                   0
-Created Time:              05/05/2023 11:34:43
-Modified Time:             03/22/2024 18:59:29
========================================================================================
WSUSXML (Microsoft Updates) Downloaded
10/10/2023 17:00:06 - SSU - 2023-10 Servicing Stack Update for Windows 10 Version 22H2 for x64-based Systems (KB5031539)
01/09/2024 18:00:00 - DotNetCU - 2024-01 Cumulative Update for .NET Framework 3.5 4.8 and 4.8.1 for Windows 10 Version 22H2 for x64 (KB5034275)
01/09/2024 18:00:00 - DotNetCU - 2024-01 Cumulative Update for .NET Framework 3.5 4.8 and 4.8.1 for Windows 10 Version 22H2 for x64 (KB5034275)
01/09/2024 18:00:06 - ComponentDU SafeOS - 2024-01 Dynamic Update for Windows 10 Version 22H2 for x64-based Systems (KB5034232)
02/13/2024 18:00:00 - DotNetCU - 2024-02 Cumulative Update for .NET Framework 3.5 4.8 and 4.8.1 for Windows 10 Version 22H2 for x64 (KB5034685)
02/13/2024 18:00:00 - DotNetCU - 2024-02 Cumulative Update for .NET Framework 3.5 4.8 and 4.8.1 for Windows 10 Version 22H2 for x64 (KB5034685)
03/12/2024 17:00:06 - LCU - 2024-03 Cumulative Update for Windows 10 Version 22H2 for x64-based Systems (KB5035845)
========================================================================================
WARNING: Use the -Execute parameter to complete this task

I'm fairly certain I'm missing something really simple, but so far I haven't figured it out and any help would be appreciated.

/Mikkel

Rickard-l commented 7 months ago

Hi Mikkel,

Your OSD version seems to be a bit outdated OSD 24.3.20.1. The latest available at the moment is 24.4.9.1. Did you run the command OSDBuilder -Update before running the command Update-OSmedia -Download -Execute.

Before trying to update your images, have a quick look at the updates.md https://github.com/OSDeploy/OSD/blob/master/UPDATES.md check if the latest updates are checked into the repo before trying to update the OSD-module.

mikkelandreasen commented 7 months ago

So... simple! I must have tried every bloody combination of commands, but for some reason not the one you suggested. Which appears to be what I was missing.

This also means I need to adjust my schedueling to handle the module update separately from the image update.

A related question - what is the usual "delay" from Microsoft releasing patches to them being included in the repo?

/mikkel

xe0n11 commented 7 months ago

@mikkelandreasen - usually a couple of days.

Pro tip: Setup a scheduled task to update the modules and let it either run on schedule or kick it off manually when it's been updated 👍.

mikkelandreasen commented 7 months ago

@xe0n11 Excellent. Right now I have three schedules

  1. Nightly update of the o365 deployment
  2. Nightly update of the OSDBuilder modulo (11 pm)
  3. Monthly update of the image (3rd Wedensday at 1 am)

Will look into adding some logic into the image creation process so I don't build identical images. Shouldn't be too difficult.

Much apreciate the help and input

/mikkel

mikkelandreasen commented 7 months ago

This sure looks like a new build number compared to last time :)

image

And automatically imported to MDT. image

I am a happy camper :)