Adding "-PreventPending" to the "add-windowspackage" command allows the dism cleanup of the winsxs folder command to be moved from the InstallAppsandSysprep.cmd script to right after the updates are added to the vhdx. The end result:
FFU image size before: 11.836GB
FFU image size after: 11.190GB
The Uninstall-ADK function silently uninstalls the ADK component that is specified.
The Find-InstalledProgramInfo function searches the registry path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall" to determine if certain programs are installed or properties of installed programs (e.g., version number, uninstall string, etc.).
This commit introduces the Confirm-ADKVersionIsLatest function to check if the currently installed version of the ADK is the latest available version from Microsoft.
This commit introduces two new functions, Get-ADKURL and Install-ADK, to facilitate the retrieval and installation of the Windows Assessment and Deployment Kit (ADK) components.
The Get-ADKURL function retrieves the download URL for the specified ADK option (either "Windows ADK" or "WinPE Add-on") from the official Microsoft documentation page. It utilizes web scraping to extract the URL dynamically.
The Install-ADK function downloads the specified ADK component from the obtained URL and installs it silently on the system. It handles errors gracefully and cleans up the temporary installation file after completion.
These functions enhance the automation capabilities of the project by simplifying the process of acquiring and installing ADK components required for Windows deployment and assessment tasks.
This commit refactors the BuildFFUVM.ps1 script by:
- Changing the default value of FFUDevelopmentPath to $PSScriptRoot
- Adding a new parameter RemoveFFU
- Adding a new function Remove-FFU to remove all FFU files in the FFUCaptureLocation
- Adding a conditional block to call Remove-FFU if RemoveFFU parameter is true