How to configure autounattend.xml to handle all Windows updates?


  1. Posts : 2
    MacOS, Windows 11, many others via VM
       #1

    How to configure autounattend.xml to handle all Windows updates?


    I am using Packer to build an OVA with VirtualBox using a Windows Server 2019 ISO and I am also trying to learn as much as I can about the Windows autounattend.xml files. I have googled and searched this very active forum but can't seem to find anything to point me in the right direction.

    So my question is: How does one configure autounattend.xml to handle all Windows updates as the Packer docs recommend?

    I have tried System Image Manager to try and find the solution, and I found "Update Services" in "Windows Foundation Package" which might be part of my answer, but when I try to use it I get over 25 validation errors which say a dependency has not been enabled but gives no indication of what dependency I need to enable.

    I have also asked on the Packer forum but given I've seen no activity there for the past week even though I've asked other questions there I don't expect to get a response any time soon. But via Google I found this forum which appears to have lots of activity and has had a lot of questions about autounattend.xml so I am hoping I am in the right place.

    Thank you in advance if you can help.
      My Computer


  2. Posts : 1
    Win 10
       #2

    There's a packer plugin that will do it
    GitHub - rgl/packer-plugin-windows-update: Packer plugin for installing Windows updates

    If you specifically want to do it in your autounattend file, you need to run a script that does it for you. The repo I linked has a powershell that can do it. You need to attach it to the vm with floppy_files in your packer file and call it in autounattend like this:

    Code:
    <SynchronousCommand wcm:action="add">
      <CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\windows-update.ps1</CommandLine>
      <Description>Run Windows Update</Description>
      <Order>13</Order>
      <RequiresUserInput>true</RequiresUserInput>
    </SynchronousCommand>
      My Computer


  3. Posts : 2
    MacOS, Windows 11, many others via VM
    Thread Starter
       #3

    uglor said:
    ...
    Thanks for the reply.

    So I am already doing it with a script. I wanted to learn if it was possible to do it declaratively in autoattend.xml and if so how.

    But given your reply I take it that it is not possible in autoattend.xml and I will just have to stick with the script?
    Last edited by mikeschinkel; 26 Jan 2022 at 14:44. Reason: Formatting
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 20:30.
Find Us




Windows 10 Forums