From 6bd1a19a28815700f1bc0f236e8af3b14df720ad Mon Sep 17 00:00:00 2001 From: Andre Sicking Date: Fri, 21 Oct 2022 11:41:27 +0200 Subject: [PATCH 1/2] Changed variable name WebClientTemp --- Public/Functions/split/Save-WebFile.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Public/Functions/split/Save-WebFile.ps1 b/Public/Functions/split/Save-WebFile.ps1 index 94f0b854..d579d6fd 100644 --- a/Public/Functions/split/Save-WebFile.ps1 +++ b/Public/Functions/split/Save-WebFile.ps1 @@ -109,9 +109,9 @@ function Save-WebFile { if ($UseWebClient -eq $true) { [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls1 - $WebClient = New-Object System.Net.WebClient - $WebClient.DownloadFile($SourceUrl, $DestinationFullName) - $WebClient.Dispose() + $WebClientTemp = New-Object System.Net.WebClient + $WebClientTemp.DownloadFile($SourceUrl, $DestinationFullName) + $WebClientTemp.Dispose() } else { Write-Verbose "cURL Source: $SourceUrl" From dce1ea810ea7eebd90c9fae951d45dcbc95c0e62 Mon Sep 17 00:00:00 2001 From: Andre Sicking Date: Fri, 21 Oct 2022 11:46:58 +0200 Subject: [PATCH 2/2] corrected If statement to proper field --- Public/Functions/split/Update-MyWindowsImage.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Public/Functions/split/Update-MyWindowsImage.ps1 b/Public/Functions/split/Update-MyWindowsImage.ps1 index 45ef4170..dbb278f7 100644 --- a/Public/Functions/split/Update-MyWindowsImage.ps1 +++ b/Public/Functions/split/Update-MyWindowsImage.ps1 @@ -91,7 +91,7 @@ function Update-MyWindowsImage { #================================================= $global:GetWSUSXML = Get-WSUSXML -Catalog Windows -Silent | Sort-Object UpdateGroup -Descending - if ($global:GetRegCurrentVersion.ReleaseId -gt 0) { + if ($global:GetRegCurrentVersion.DisplayVersion -gt 0) { $global:GetWSUSXML = $global:GetWSUSXML | Where-Object {$_.UpdateBuild -eq $global:GetRegCurrentVersion.DisplayVersion} } else {