This commit is contained in:
Jaromir Kaspar 2021-04-05 16:15:56 +02:00
Родитель 5342b767cb
Коммит 254df0a179
1 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -1,10 +1,10 @@
$Products=@()
$Products+=@{Product="Azure Stack HCI 20H2";SearchString="Cumulative Update for Azure Stack HCI, version 20H2" ;SSUSearchString="Servicing Stack Update for Azure Stack HCI, version 20H2 for x64-based Systems" ;ID="Azure Stack HCI"}
$Products+=@{Product="Windows Server 2019" ;SearchString="Cumulative Update for Windows Server 2019 for x64-based Systems" ;SSUSearchString="Servicing Stack Update for Windows Server 2019 for x64-based Systems" ;ID="Windows Server 2019"}
$Products+=@{Product="Windows Server 2016" ;SearchString="Cumulative Update for Windows Server 2016 for x64-based Systems" ;SSUSearchString="Servicing Stack Update for Windows Server 2016 for x64-based Systems" ;ID="Windows Server 2016"}
$Products+=@{Product="Windows 10 20H2" ;SearchString="Cumulative Update for Windows 10 Version 20H2 for x64-based Systems";SSUSearchString="Servicing Stack Update for Windows 10 Version 20H2 for x64-based Systems" ;ID="Windows 10, version 1903 and later"}
$Products+=@{Product="Windows 10 2004" ;SearchString="Cumulative Update for Windows 10 Version 2004 for x64-based Systems";SSUSearchString="Servicing Stack Update for Windows 10 Version 2004 for x64-based Systems" ;ID="Windows 10, version 1903 and later"}
$Products+=@{Product="Windows 10 1909" ;SearchString="Cumulative Update for Windows 10 Version 1909 for x64-based Systems";SSUSearchString="Servicing Stack Update for Windows 10 Version 1909 for x64-based Systems" ;ID="Windows 10, version 1903 and later"}
$Products+=@{Product="Azure Stack HCI 20H2";SearchString="Cumulative Update for Azure Stack HCI, version 20H2" ;SSUSearchString="Servicing Stack Update for Azure Stack HCI, version 20H2 for x64-based Systems" ; ID="Azure Stack HCI"}
$Products+=@{Product="Windows Server 2019" ;SearchString="Cumulative Update for Windows Server 2019 for x64-based Systems" ;SSUSearchString="Servicing Stack Update for Windows Server 2019 for x64-based Systems" ; ID="Windows Server 2019"}
$Products+=@{Product="Windows Server 2016" ;SearchString="Cumulative Update for Windows Server 2016 for x64-based Systems" ;SSUSearchString="Servicing Stack Update for Windows Server 2016 for x64-based Systems" ; ID="Windows Server 2016"}
$Products+=@{Product="Windows 10 20H2" ;SearchString="Cumulative Update for Windows 10 Version 20H2 for x64-based Systems";SSUSearchString="Servicing Stack Update for Windows 10 Version 20H2 for x64-based Systems" ; ID="Windows 10, version 1903 and later"}
$Products+=@{Product="Windows 10 2004" ;SearchString="Cumulative Update for Windows 10 Version 2004 for x64-based Systems";SSUSearchString="Servicing Stack Update for Windows 10 Version 2004 for x64-based Systems" ; ID="Windows 10, version 1903 and later"}
$Products+=@{Product="Windows 10 1909" ;SearchString="Cumulative Update for Windows 10 Version 1909 for x64-based Systems";SSUSearchString="Servicing Stack Update for Windows 10 Version 1909 for x64-based Systems" ; ID="Windows 10, version 1903 and later"}
#grab folder to download to
$folder=Read-Host -Prompt "Please type path to download. For example `"c:\temp`" (if nothing specified, $PSScriptRoot is used)"
@ -52,7 +52,7 @@ Foreach($SelectedProduct in $SelectedProducts){
$update | Save-MSCatalogUpdate -Destination "$DestinationFolder" #-UseBits
#Download SSU
$update=Get-MSCatalogUpdate -Search $item.SSUSearchString | Select-Object -First 1
$update=Get-MSCatalogUpdate -Search $item.SSUSearchString | Where-Object Products -eq $item.ID | Select-Object -First 1
Write-Output "Downloading $($update.title) to $destinationFolder"
$update | Save-MSCatalogUpdate -Destination $DestinationFolder #-UseBits
}