Windows partition is shrunk down and full applying an Optimized FFU image

Lil Jimmy 20 Reputation points

I created a FFU image, via bootable WinPE, for use in desktop manufacturing. The Windows partition on the reference PC is around 950 GB. The FFU image will be applied to desktop PC's with identical hardware in most cases but I was concerned there might be some slight variance in hard drive size so I used the Optimize-FFU option in DISM.

  • I have the latest ADK and WinPE add-on.
  • The reference PC Windows version Win10 IOT Enterprise LTSC 2021
  • Before capturing the FFU, I generalized it with SysPrep
  • I copied the FFU to a technician PC, with Windows 10 22H2, to perform the Optimization option

I tested the optimized image and it applied to a destination PC successfully (and much faster) but the Windows partition was shrunk down 18 GB and the rest of the drive space was left unallocated. I followed the instructions in the link below. I under the impression that optimized FFU's are supposed to expand or shrink the Windows partition to the maximum size possible based on the drive? Am I missing a step that isn't on this page?


Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,165 questions
0 comments No comments
{count} votes

Accepted answer
  1. Hania Lian (Shanghai Wicresoft Co,.Ltd.) 5,361 Reputation points Microsoft Vendor

    Hello, The Optimize-FFU option in DISM indeed compresses the FFU image, but it does not necessarily expand the Windows partition to occupy the entire disk space. This is likely the reason why the Windows partition size is reduced and the rest of the drive space is left unallocated. If you want the Windows partition to take up the entire disk space, you will need to manually extend the partition after deploying the image. You can use DiskPart for this. Here’s how you can do it in your MDT Task Sequence: Add a new “Run Command Line” task after the “Apply Image” task in your Task Sequence. In the command line box, type: cmd /c "echo select volume c > diskpart.txt && echo extend >> diskpart.txt && diskpart /s diskpart.txt" This command will create a new DiskPart script that selects the C: volume and extends it to occupy the remaining disk space. Then it runs the DiskPart script. This will ensure that the Windows partition is extended to the maximum size possible after the FFU image is applied. Remember to test this on a non-production environment first to make sure it works as expected. Best Regards, Hania Lian

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Todd Taylor 0 Reputation points

    This happened to me too. I started imaging with FFU in September '23 and could never get an optimized image to auto-expand. I've searched for answers every few weeks since then and finally came upon some discussions about optimize-ffu being "broken" and fixed in 23H2. Here's some of the discussion. Anyway - I needed to refresh my images so I upgraded my ADK and WinPE, remade my bootable USB with them, captured/optimized my new FFU and voila... Auto-expansion worked. I actually upgraded to the Insider Preview edition of ADK/WinPE just cuz. The DISM version working for me is 10.0.26040.1000. YMMV but some more info for ya.