From 4cdf00be41647af5c4c6eb730ff5a94ccda0705e Mon Sep 17 00:00:00 2001 From: Jakub Piesik Date: Sun, 18 Jun 2023 23:13:48 +0200 Subject: [PATCH] Update CreateSurfaceWindowsImage.ps1 Fix for the Invoke-WebRequest : The response content cannot be parsed because the Internet Explorer engine is not available, or Internet Explorer's first-launch configuration is not complete. Specify the UseBasicParsing parameter and try again. --- CreateSurfaceWindowsImage.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CreateSurfaceWindowsImage.ps1 b/CreateSurfaceWindowsImage.ps1 index ccbdfc0..efb3cf1 100644 --- a/CreateSurfaceWindowsImage.ps1 +++ b/CreateSurfaceWindowsImage.ps1 @@ -800,7 +800,7 @@ Function Download-LatestUpdates $post = @{ size = 0; updateID = $guid; uidInfo = $guid } | ConvertTo-Json -Compress $body = @{ updateIDs = "[$post]" } - Invoke-WebRequest -Uri 'https://www.catalog.update.microsoft.com/DownloadDialog.aspx' -Method Post -Body $body | Select-Object -ExpandProperty Content + Invoke-WebRequest -Uri 'https://www.catalog.update.microsoft.com/DownloadDialog.aspx' -Method Post -Body $body -UseBasicParsing | Select-Object -ExpandProperty Content } $downloaddialogs = $global:KBGUID | ForEach-Object -Process $scriptblock @@ -1157,7 +1157,7 @@ Function Get-LatestSurfaceEthernetDrivers $post = @{ size = 0; updateID = $guid; uidInfo = $guid } | ConvertTo-Json -Compress $body = @{ updateIDs = "[$post]" } - Invoke-WebRequest -Uri 'https://www.catalog.update.microsoft.com/DownloadDialog.aspx' -Method Post -Body $body | Select-Object -ExpandProperty Content + Invoke-WebRequest -Uri 'https://www.catalog.update.microsoft.com/DownloadDialog.aspx' -Method Post -Body $body -UseBasicParsing | Select-Object -ExpandProperty Content } $downloaddialogs = $global:KBGUID | ForEach-Object -Process $scriptblock