Automated PowerShell Script to upgrade Windows 11 22H2 to 23H2

Discussion in 'Windows 11' started by Eyzoius, Nov 14, 2023.

  1. Eyzoius

    Eyzoius MDL Novice

    Nov 14, 2023
    2
    0
    0
    Hello everyone, I want to ask for some help in creating this automation script as I am experiencing problems making it work without encountering any issues.

    Current script:

    # Path to the ISO file
    $isoPath = "C:\Users\Owner\Downloads\Upgrade\WIN11-23H2.iso"

    # Mount the ISO
    $mountResult = Mount-DiskImage -ImagePath $isoPath -PassThru
    $volumeInfo = $mountResult | Get-Volume

    # Assuming the ISO gets mounted to the D: drive
    $setupPath = ($volumeInfo.DriveLetter + ":\setup.exe")

    # Start the upgrade process
    Start-Process -FilePath $setupPath -ArgumentList "/Auto Upgrade /NoReboot /Showoobe None /DynamicUpdate Enable /AcceptEula" -Wait

    What I want to achieve: To fully automate the setup process, from accepting the EULA until the setup is done without user intervention.
    Issue: An unknown command-line option [/Auto] was specified.
     
  2. 12 lb Turkey

    12 lb Turkey MDL Junior Member

    Nov 24, 2022
    87
    48
    0
    To be clear, it's a small Enablement Package after you've made sure 22H2 is properly updated to Oct 2023 CU.
    23H2's features are already hidden inside the 22H2 CU, and need to be switched on.
     
  3. Eyzoius

    Eyzoius MDL Novice

    Nov 14, 2023
    2
    0
    0
    Thank you for this Enthousiast, 12 lb Turkey
    The thing is, I needed to use .iso file to upgrade directly even the first version of 22H2 or even 21H2.
     
  4. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,455
    95,325
    450
    Win 11 22H2 to 23H2 by small EP will work from 22621.2361 and up, from Win 11 21H2 (22000.xxxx) it will take a full ISO upgrade, can't imagine why that would need to be automated.
     
  5. anansay

    anansay MDL Member

    Jul 13, 2020
    216
    76
    10
    What is the official link to download this small 23h2 enablement package?
     
  6. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,455
    95,325
    450