mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
Docs
This commit is contained in:
+17
-11
@@ -1,39 +1,45 @@
|
||||
# Change Log
|
||||
|
||||
**2406.1**
|
||||
This is a major release that includes the ability to download drivers from the 4 major OEMs (Microsoft, Dell, HP, Lenovo) by simply passing the -Make and -Model parameters to the command line.
|
||||
This is a major release that includes the ability to download drivers from the 4 major OEMs (Microsoft, Dell, HP, Lenovo) by simply passing the -Make and -Model parameters to the command line.
|
||||
|
||||
For Dell, HP, and Lenovo, the script leverages a similar process to their corresponding tools that automate driver downloads (Dell SupportAssist, HP Image Assistant, Lenovo System Update/Update Retriever). For Microsoft Surface, it scrapes the Surface Downloads page for the appropriate MSI file to download. Using this method, the drives that are downloaded will be the latest provided by the OEM, unlike other tools that download out of date enteprise CAB files that are made for ConfigMgr.
|
||||
For Dell, HP, and Lenovo, the script leverages a similar process to their corresponding tools that automate driver downloads (Dell SupportAssist, HP Image Assistant, Lenovo System Update/Update Retriever). For Microsoft Surface, it scrapes the Surface Downloads page for the appropriate MSI file to download. Using this method, the drivers that are downloaded will be the latest provided by the OEM, unlike other tools that download out of date enteprise CAB files that are made for ConfigMgr.
|
||||
|
||||
The script supports lookups using the -model parameter. For example, if you want to download the drivers for a Surface Laptop Go 3, but don't know the exact model name, you could set -Make 'Microsoft' -Model 'Laptop Go' and it'll give you a list of Surface devices to pick from. If you know the exact name, it'll use that.
|
||||
The script supports lookups using the -model parameter. For example, if you want to download the drivers for a Surface Laptop Go 3, but don't know the exact model name, you could set -Make 'Microsoft' -Model 'Laptop Go' and it'll give you a list of Surface devices to pick from. If you know the exact name, it'll use that and not prompt.
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||
|
||||
The goal here is to make it easy to discover the drivers you want to download without having to know the exact model names.
|
||||
|
||||
There are likely going to be bugs with this, but in my testing things seem to work well for the makes and models that I've tried. If you notice something, please fill out an issue in the repro and I'll take a look. If you want to fix whatever issue you're running into, submit a pull request.
|
||||
The goal here is to make it easy to discover the drivers you want to download without having to know the exact model names.
|
||||
|
||||
There are likely going to be bugs with this, but in my testing things seem to work well for the makes and models that I've tried. If you notice something, please fill out an issue in the repro and I'll take a look. If you want to fix whatever issue you're running into, submit a pull request.
|
||||
|
||||
- Created new parameters
|
||||
- Make
|
||||
- Model
|
||||
- UserAgent
|
||||
- DriversFolder
|
||||
- Headers
|
||||
|
||||
**2405.1**
|
||||
|
||||
- Moved the resetbase command from within the VM to after servicing the VHDX. This will make it so the FFU size is smaller after the latest CU or .NET framework are installed. (Thanks to Mike Kelly for the PR [Commit](https://github.com/rbalsleyMSFT/FFU/pull/24))
|
||||
- Some additional FFU size reduction enhancements (Thanks Zehadi Alam [Commit](https://github.com/rbalsleyMSFT/FFU/pull/25)):
|
||||
- Disk cleanup is now run before sysprep to help reduce FFU file size
|
||||
- Before FFU capture, Optimize-FFU is run to defrag and slabconsolidate the VHDX
|
||||
|
||||
|
||||
**2404.3**
|
||||
|
||||
- Fixed an issue where the latest Windows CU wasn't downloading properly [Commit](https://github.com/rbalsleyMSFT/FFU/commit/ae59183a199f39b310c79b31c9b4980fafdeb79b)
|
||||
|
||||
**2404.2**
|
||||
|
||||
- If setting -installdrivers to $true and -logicalsectorsizebytes to 4096, the script will now set $copyDrivers to $true. This will create a drivers folder on the deploy partition of the USB drive with the drivers that were supposed to be added to the FFU. There's currently a bug with servicing FFUs with 4096 logical sector byte sizes. Prior to this fix, the script would tell the user to manually set -copydrivers to $true as workaround. This fix just does the workaround automatically.
|
||||
- If setting -installdrivers to $true and -logicalsectorsizebytes to 4096, the script will now set $copyDrivers to $true. This will create a drivers folder on the deploy partition of the USB drive with the drivers that were supposed to be added to the FFU. There's currently a bug with servicing FFUs with 4096 logical sector byte sizes. Prior to this fix, the script would tell the user to manually set -copydrivers to $true as workaround. This fix just does the workaround automatically.
|
||||
|
||||
**2404.1**
|
||||
|
||||
There's a big change with this release related to the ADK. The ADK will now be automatically updated to the latest ADK release. This is required in order to fix an issue with optimized FFUs not applying due to an issue with DISM/FFUProvider.dll. The FFUProvider.dll fix was added to the Sept 2023 ADK. Since we now have the ability to auto upgrade the ADK, I'm more confident in having the BuildFFUVM script creating a complete FFU now (prior it was only creating 3 partitions instead of 4 with the recovery partition - at deployment time, the ApplyFFU.ps1 script would create an empty recovery partition and Windows would populate it on first boot). Please open an issue if this creates a problem for you. I do realize that any new ADK release can have it's own challenges and issues and I do suspect we'll see a new ADK released later this year.
|
||||
There's a big change with this release related to the ADK. The ADK will now be automatically updated to the latest ADK release. This is required in order to fix an issue with optimized FFUs not applying due to an issue with DISM/FFUProvider.dll. The FFUProvider.dll fix was added to the Sept 2023 ADK. Since we now have the ability to auto upgrade the ADK, I'm more confident in having the BuildFFUVM script creating a complete FFU now (prior it was only creating 3 partitions instead of 4 with the recovery partition - at deployment time, the ApplyFFU.ps1 script would create an empty recovery partition and Windows would populate it on first boot). Please open an issue if this creates a problem for you. I do realize that any new ADK release can have it's own challenges and issues and I do suspect we'll see a new ADK released later this year.
|
||||
|
||||
- Allow for ISOs with single index WIMs to work [Issue 10](https://github.com/rbalsleyMSFT/FFU/issues/10) - [Commit](https://github.com/rbalsleyMSFT/FFU/commit/9e2da741d53652e6e600ca19cfd38f507bd01fde)
|
||||
- Added more robust ADK handling. Will now check for the latest ADK and download it if not installed. Thanks to [Zehadi Alam](https://github.com/zehadialam) [PR 18](https://github.com/rbalsleyMSFT/FFU/pull/18)
|
||||
@@ -132,4 +138,4 @@ Bug Fixes
|
||||
|
||||
.\BuildFFUVM.ps1 -WindowsSKU 'Pro' -Installapps $true -InstallOffice $true -InstallDrivers $true -VMSwitchName 'Name of your VM Switch in Hyper-V' -VMHostIPAddress 'Your IP Address' -CreateCaptureMedia $true -CreateDeploymentMedia $true -BuildUSBDrive $true -WindowsRelease 11 -WindowsArch 'x64' -WindowsLang 'fr-ca' -MediaType 'consumer' -verbose
|
||||
- Changed default size of System/EFI partition to 260MB from 256MB to accomodate 4Kn drives. 4Kn support needs more testing. I'm not confident yet that this can be done with VMs and FFUs.
|
||||
- Added versioning with a new version parameter. Using YYMM as the format followed by a point release.
|
||||
- Added versioning with a new version parameter. Using YYMM as the format followed by a point release.
|
||||
|
||||
@@ -184,6 +184,7 @@ param(
|
||||
[string]$FFUDevelopmentPath = $PSScriptRoot,
|
||||
[bool]$InstallApps,
|
||||
[bool]$InstallOffice,
|
||||
[ValidateSet('Microsoft', 'Dell', 'HP', 'Lenovo')]
|
||||
[string]$Make,
|
||||
[string]$Model,
|
||||
[Parameter(Mandatory = $false)]
|
||||
@@ -292,7 +293,22 @@ param(
|
||||
[bool]$CleanupAppsISO = $true,
|
||||
[string]$DriversFolder,
|
||||
[bool]$CleanupDrivers = $true,
|
||||
[string]$UserAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0'
|
||||
[string]$UserAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0',
|
||||
#Microsoft sites will intermittently fail on downloads. These headers are to help with that.
|
||||
$Headers = @{
|
||||
"Accept" = "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"
|
||||
"Accept-Encoding" = "gzip, deflate, br, zstd"
|
||||
"Accept-Language" = "en-US,en;q=0.9"
|
||||
"Priority" = "u=0, i"
|
||||
"Sec-Ch-Ua" = "`"Microsoft Edge`";v=`"125`", `"Chromium`";v=`"125`", `"Not.A/Brand`";v=`"24`""
|
||||
"Sec-Ch-Ua-Mobile" = "?0"
|
||||
"Sec-Ch-Ua-Platform" = "`"Windows`""
|
||||
"Sec-Fetch-Dest" = "document"
|
||||
"Sec-Fetch-Mode" = "navigate"
|
||||
"Sec-Fetch-Site" = "none"
|
||||
"Sec-Fetch-User" = "?1"
|
||||
"Upgrade-Insecure-Requests" = "1"
|
||||
}
|
||||
)
|
||||
$version = '2406.1'
|
||||
|
||||
@@ -507,7 +523,7 @@ function Get-MicrosoftDrivers {
|
||||
WriteLog "Getting Surface driver information from $url"
|
||||
$OriginalVerbosePreference = $VerbosePreference
|
||||
$VerbosePreference = 'SilentlyContinue'
|
||||
$webContent = Invoke-WebRequest -Uri $url -UseBasicParsing -Headers (Get-Headers) -UserAgent $UserAgent
|
||||
$webContent = Invoke-WebRequest -Uri $url -UseBasicParsing -Headers $Headers -UserAgent $UserAgent
|
||||
$VerbosePreference = $OriginalVerbosePreference
|
||||
WriteLog "Complete"
|
||||
|
||||
@@ -573,7 +589,7 @@ function Get-MicrosoftDrivers {
|
||||
WriteLog "Getting download page content"
|
||||
$OriginalVerbosePreference = $VerbosePreference
|
||||
$VerbosePreference = 'SilentlyContinue'
|
||||
$downloadPageContent = Invoke-WebRequest -Uri $selectedModel.Link -UseBasicParsing -Headers (Get-Headers) -UserAgent $UserAgent
|
||||
$downloadPageContent = Invoke-WebRequest -Uri $selectedModel.Link -UseBasicParsing -Headers $Headers -UserAgent $UserAgent
|
||||
$VerbosePreference = $OriginalVerbosePreference
|
||||
WriteLog "Complete"
|
||||
WriteLog "Parsing download page for file"
|
||||
@@ -1269,7 +1285,7 @@ function Get-ADKURL {
|
||||
# Retrieve content of Microsoft documentation page
|
||||
$OriginalVerbosePreference = $VerbosePreference
|
||||
$VerbosePreference = 'SilentlyContinue'
|
||||
$ADKWebPage = Invoke-RestMethod "https://learn.microsoft.com/en-us/windows-hardware/get-started/adk-install" -Headers (Get-Headers) -UserAgent $UserAgent
|
||||
$ADKWebPage = Invoke-RestMethod "https://learn.microsoft.com/en-us/windows-hardware/get-started/adk-install" -Headers $Headers -UserAgent $UserAgent
|
||||
$VerbosePreference = $OriginalVerbosePreference
|
||||
|
||||
# Extract download URL based on specified pattern
|
||||
@@ -1429,7 +1445,7 @@ function Confirm-ADKVersionIsLatest {
|
||||
$installedADKVersion = $adkRegKey.GetValue("DisplayVersion")
|
||||
|
||||
# Retrieve content of Microsoft documentation page
|
||||
$adkWebPage = Invoke-RestMethod "https://learn.microsoft.com/en-us/windows-hardware/get-started/adk-install" -Headers (Get-Headers) -UserAgent $UserAgent
|
||||
$adkWebPage = Invoke-RestMethod "https://learn.microsoft.com/en-us/windows-hardware/get-started/adk-install" -Headers $Headers -UserAgent $UserAgent
|
||||
# Specify regex pattern for ADK version
|
||||
$adkVersionPattern = 'ADK\s+(\d+(\.\d+)+)'
|
||||
# Check for regex pattern match
|
||||
@@ -1545,7 +1561,7 @@ function Get-WindowsESD {
|
||||
$cabFilePath = Join-Path $PSScriptRoot "tempCabFile.cab"
|
||||
$OriginalVerbosePreference = $VerbosePreference
|
||||
$VerbosePreference = 'SilentlyContinue'
|
||||
Invoke-WebRequest -Uri $cabFileUrl -OutFile $cabFilePath -Headers (Get-Headers) -UserAgent $UserAgent
|
||||
Invoke-WebRequest -Uri $cabFileUrl -OutFile $cabFilePath -Headers $Headers -UserAgent $UserAgent
|
||||
$VerbosePreference = $OriginalVerbosePreference
|
||||
WriteLog "Download succeeded"
|
||||
|
||||
@@ -1572,7 +1588,7 @@ function Get-WindowsESD {
|
||||
WriteLog "Downloading $($file.filePath) to $esdFIlePath"
|
||||
$OriginalVerbosePreference = $VerbosePreference
|
||||
$VerbosePreference = 'SilentlyContinue'
|
||||
Invoke-WebRequest -Uri $file.FilePath -OutFile $esdFilePath -Headers (Get-Headers) -UserAgent $UserAgent
|
||||
Invoke-WebRequest -Uri $file.FilePath -OutFile $esdFilePath -Headers $Headers -UserAgent $UserAgent
|
||||
$VerbosePreference = $OriginalVerbosePreference
|
||||
WriteLog "Download succeeded"
|
||||
#Set back to show progress
|
||||
@@ -1587,28 +1603,12 @@ function Get-WindowsESD {
|
||||
}
|
||||
}
|
||||
|
||||
#Microsoft webpages are intermittently returning 404 errors when downloading ODT and Surface Drivers.
|
||||
function Get-Headers{
|
||||
$headers = @{
|
||||
"Accept" = "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"
|
||||
"Accept-Encoding" = "gzip, deflate, br, zstd"
|
||||
"Accept-Language" = "en-US,en;q=0.9"
|
||||
"Priority" = "u=0, i"
|
||||
"Sec-Ch-Ua" = "`"Microsoft Edge`";v=`"125`", `"Chromium`";v=`"125`", `"Not.A/Brand`";v=`"24`""
|
||||
"Sec-Ch-Ua-Mobile" = "?0"
|
||||
"Sec-Ch-Ua-Platform" = "`"Windows`""
|
||||
"Sec-Fetch-Dest" = "document"
|
||||
"Sec-Fetch-Mode" = "navigate"
|
||||
"Sec-Fetch-Site" = "none"
|
||||
"Sec-Fetch-User" = "?1"
|
||||
"Upgrade-Insecure-Requests" = "1"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function Get-ODTURL {
|
||||
|
||||
# [String]$MSWebPage = Invoke-RestMethod 'https://www.microsoft.com/en-us/download/confirmation.aspx?id=49117'
|
||||
[String]$MSWebPage = Invoke-RestMethod 'https://www.microsoft.com/en-us/download/confirmation.aspx?id=49117' -Headers (Get-Headers) -UserAgent $UserAgent
|
||||
[String]$MSWebPage = Invoke-RestMethod 'https://www.microsoft.com/en-us/download/confirmation.aspx?id=49117' -Headers $Headers -UserAgent $UserAgent
|
||||
|
||||
$MSWebPage | ForEach-Object {
|
||||
if ($_ -match 'url=(https://.*officedeploymenttool.*\.exe)') {
|
||||
@@ -1624,7 +1624,7 @@ function Get-Office {
|
||||
WriteLog "Downloading Office Deployment Toolkit from $ODTUrl to $ODTInstallFile"
|
||||
$OriginalVerbosePreference = $VerbosePreference
|
||||
$VerbosePreference = 'SilentlyContinue'
|
||||
Invoke-WebRequest -Uri $ODTUrl -OutFile $ODTInstallFile -Headers (Get-Headers) -UserAgent $UserAgent
|
||||
Invoke-WebRequest -Uri $ODTUrl -OutFile $ODTInstallFile -Headers $Headers -UserAgent $UserAgent
|
||||
$VerbosePreference = $OriginalVerbosePreference
|
||||
|
||||
# Extract ODT
|
||||
@@ -1664,7 +1664,7 @@ function Get-KBLink {
|
||||
)
|
||||
$OriginalVerbosePreference = $VerbosePreference
|
||||
$VerbosePreference = 'SilentlyContinue'
|
||||
$results = Invoke-WebRequest -Uri "http://www.catalog.update.microsoft.com/Search.aspx?q=$Name" -Headers (Get-Headers) -UserAgent $UserAgent
|
||||
$results = Invoke-WebRequest -Uri "http://www.catalog.update.microsoft.com/Search.aspx?q=$Name" -Headers $Headers -UserAgent $UserAgent
|
||||
$VerbosePreference = $OriginalVerbosePreference
|
||||
$kbids = $results.InputFields |
|
||||
Where-Object { $_.type -eq 'Button' -and $_.Value -eq 'Download' } |
|
||||
@@ -1694,7 +1694,7 @@ function Get-KBLink {
|
||||
$body = @{ updateIDs = "[$post]" }
|
||||
$OriginalVerbosePreference = $VerbosePreference
|
||||
$VerbosePreference = 'SilentlyContinue'
|
||||
$links = Invoke-WebRequest -Uri 'https://www.catalog.update.microsoft.com/DownloadDialog.aspx' -Method Post -Body $body -Headers (Get-Headers) -UserAgent $UserAgent |
|
||||
$links = Invoke-WebRequest -Uri 'https://www.catalog.update.microsoft.com/DownloadDialog.aspx' -Method Post -Body $body -Headers $Headers -UserAgent $UserAgent |
|
||||
Select-Object -ExpandProperty Content |
|
||||
Select-String -AllMatches -Pattern "http[s]?://[^']*\.microsoft\.com/[^']*|http[s]?://[^']*\.windowsupdate\.com/[^']*" |
|
||||
Select-Object -Unique
|
||||
@@ -1727,7 +1727,7 @@ function Get-LatestWindowsKB {
|
||||
# Use Invoke-WebRequest to fetch the content of the page
|
||||
$OriginalVerbosePreference = $VerbosePreference
|
||||
$VerbosePreference = 'SilentlyContinue'
|
||||
$response = Invoke-WebRequest -Uri $updateHistoryUrl -Headers (Get-Headers) -UserAgent $UserAgent
|
||||
$response = Invoke-WebRequest -Uri $updateHistoryUrl -Headers $Headers -UserAgent $UserAgent
|
||||
$VerbosePreference = $OriginalVerbosePreference
|
||||
|
||||
# Use a regular expression to find the KB article number
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user