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
When using -installapps $false when capturing a FFU, a Critical Process Died BSOD would happen when deploying the FFU and Windows attempted to load.
When capturing the FFU, the registry is loaded to grab the Windows version information to create the FFU file name. After unloading the registry, the FFU is captured. This process can happen too fast on certain hard drives (NVME). A 15 second delay was added after the unloading of the registry to allow for the process to complete before the FFU is captured.
Included some better error handling if defining optionalfeatures that require source folders (netfx3). ESD files don't have source folders like ISO media, which means installing .net 3.5 as an optional feature would fail. Also cleaned up some formatting.