ryan-jan / mscatalog Goto Github PK
View Code? Open in Web Editor NEWPowerShell module for searching and downloading offline updates from https://www.catalog.update.microsoft.com
License: MIT License
PowerShell module for searching and downloading offline updates from https://www.catalog.update.microsoft.com
License: MIT License
It wasn't downloading anything for me. I updated Get-UpdateLinks.ps1 with:
$Regex = "(http[s]?\://dl\.delivery\.mp\.microsoft\.com\/[^\'\""]*)|(http[s]?\://catalog\.s\.download\.windowsupdate\.com\/[^\'\""]*)"
And now it works.
When using the -AllPages flag results are limited to 1000.
Last month this was not a problem.
Would be great to be able to do a GET on a KB and be able to chase the supersede chains.
Hello, I was trying to use this script, but it was not finding download links, after some investigation it seems the Regex is wrong in the Get-UpdateLinks.ps1 module. A fix would be greatly appreciated! I found this bug when attempting to download the Windows Update with Guid = 8432dcb0-3e89-4c40-a032-f238aee3517f
Get-MSCatalogUpdate -Search "PCI\VEN_8086&DEV_5917" -verbose
AUSFÜHRLICH: GET https://www.catalog.update.microsoft.com/Search.aspx?q=PCI\VEN_8086&DEV_5917 with 0-byte payload
AUSFÜHRLICH: received 128147-byte response of content type text/html; charset=utf-8
AUSFÜHRLICH: POST https://www.catalog.update.microsoft.com/Search.aspx?q=PCI\VEN_8086&DEV_5917 with -1-byte payload
AUSFÜHRLICH: received 128343-byte response of content type text/html; charset=utf-8
The "&" in PNPDeviceID could not be found and needs an URL-Encoding
When searching the same string in webbrowser - the Search String is "PCI%5CVEN_8086%26DEV_5917"
Are you looking for someone to take over this package? Wondering since there havent been any merges in a while
New regex needed
SSL settings appear to have changed recently on the catalog.update.microsoft.com causing the following error if your PowerShell session does not allow TLS12 or higher.
Invoke-WebRequest : The underlying connection was closed: An unexpected error occurred on a send.
Work is underway to implement a fix in the MSCatalog code.
Please, add System and PowerShell requirements section to readme.md for using MSCatalog.
I'm new to this module.
So far I have noticed that:
e.g.
Import-Module "MSCatalog"
$windows = "Windows 10"
$version = "22H2"
$month = "2023-09"
$textSearch = "$month Cumulative Update for $windows Version $version for x64-based Systems"
$textSearch
$searchResults = Get-MSCatalogUpdate -Search $textSearch -SortBy "Title" -Descending | `
# Where-Object -Property Products -Like "*Windows 10*" | `
Where-Object -Property Title -NotLike "*Preview*" | `
Where-Object -Property Title -NotLike "*Dynamic*"
$searchResults
returns a Windows 11 result?
Can we please have parameters for filtering "Products" and "Classification" for Get-MSCatalogUpdate?
When running the Get-MSCatalogUpdate search, it returns "Preview" and "Azure Stack HCI" updates.
I can see there is already a branch being worked on to filter out "Preview", but can "Azure Stack HCI" also be filtered out?
I am no expert in powershell, but I understand some people might want to allow to "Preview" and "Azure Stack HCI" updates, so maybe have it as an option to include/exclude these types of updates?
PS C:> Get-MSCatalogUpdate -Search "2022-05 Cumulative Update for Windows Server 2019 for x64-based Systems"
Title Products Classification LastUpdated Size
2022-05 Cumulative Update Preview for Windows Server 2019 for x64-based Systems (KB5014022) Windows Server 2019 Updates 2022/05/24 575.6 MB
2022-05 Cumulative Update Preview for Azure Stack HCI, version 20H2 and Windows Server 2019 Datacenter: Azure Edition for x64-based Systems (KB5014020) Azure Stack HCI Updates 2022/05/24 198.4 MB
2022-05 Cumulative Update for Windows Server 2019 for x64-based Systems (KB5015018) Windows Server 2019 Updates 2022/05/19 563.8 MB
2022-05 Cumulative Update for Azure Stack HCI, version 20H2 and Windows Server 2019 Datacenter: Azure Edition for x64-based Systems (KB5013951) Azure Stack HCI Security Updates 2022/05/10 187.6 MB
2022-05 Cumulative Update for Windows Server 2019 for x64-based Systems (KB5013941) Windows Server 2019 Security Updates 2022/05/10 563.7 MB
Expected output would just return the following:
2022-05 Cumulative Update for Windows Server 2019 for x64-based Systems (KB5015018) Windows Server 2019 Updates 2022/05/19 563.8 MB
2022-05 Cumulative Update for Windows Server 2019 for x64-based Systems (KB5013941) Windows Server 2019 Security Updates 2022/05/10 563.7 MB
Getting an exception from Set-TempSecurityProtocol trying to enable TLS 1.3:
"Cannot convert value 'Tls13 to type 'System.Net.SecurityProtocolType
"
It looks like by default since .NET 4.7 the service point manager will use the system default (which generally will be TLS 1.2)
Honestly, I probably would just try and set TLS 1.2 for the time being or let the OS handle it. Commenting out Set-TempSecurityProtocol local fixed all issues for me and allowed me to search/download updates.
Currently, there is no way to automate Save-MSCatalogUpdate (As far as I can tell, at least) if you attempt to save an update with multiple files. It will always prompt you so select the file you want to download or enter A for all.
I can think of two ways to approach this, continue with the existing behavior unless a switch has been specified, say -AcceptMultiFileUpdates
, or just have the default behavior be to download all update files.
In my opinion, if an update has multiple files, you need all of the files. The update isn't complete without them. So I would think option 2 would be better, but that's just my opinion.
Currently the language parameter takes a regex that is used to filter which files in an update are downloaded, currently this will only download the first of the matched files. However there are use cases where more than one of the files is needed, so rather than hardcoding only downloading the first file that matches, allow all of the matched files to be downloaded.
Get-MSCatalogUpdate -Search $searchstring -SortBy LastUpdated -Descending -IncludeFileNames -Strict
Exception: C:\Program Files\PowerShell\Modules\MSCatalog\0.27.0\Public\Get-MSCatalogUpdate.ps1:106
Line |
106 | … $_.SelectNodes("td")[1].innerText.Trim() -like "*$Search* …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot index into a null array.
The version currently available on powershellgallery (1.18.0) is broken (bad regex)
I see that the issue has been fixed here, could you publish a new working version?
For now, if anyone else is in the same boat, I'm just using the Install-ModuleFromGithub to get the latest via
Install-ModuleFromGitHub -GitHubRepo ryan-jan/MSCatalog
Hi, thanks for MSCatalog tool.
I recognize that some search not working as expected it´s missing results, special with characters "8.1".
I tried using full text search and part text, both not return the results.
Get-MSCatalogUpdate -Search "2021-08 Security Only Quality Update for Windows 8.1 for x64-based Systems (KB5005106)"
Best regards.
Genivaldo Santos
Recently, I've noticed that the when you search the catalog, the results don't necessarily come sorted in chronological order, e.g. for Cumulative Update for Windows Server 2019 for x64-based Systems
, 2020-10 Cumulative Update (latest) doesn't come in until page 2. It makes it slightly inconvenient and necessitates -AllPages
flag:
${Catalog} = Get-MSCatalogUpdate -Search 'Cumulative Update for Windows Server 2019 for x64-based Systems' -AllPages -Strict
${Catalog} = ${Catalog} | Where-Object {$_.Products -eq 'Windows Server 2019'} | Sort-Object -Property Title
${LastUpdate} = ${Catalog} | Select-Object -Last 1
${LastUpdateKB} = ${LastUpdate}.Title | Select-String -Pattern '^.*\((KB\d*)\).*' -AllMatches | ForEach-Object {$_.Matches.Groups[1].Value}
${LastUpdateGuid} = ${LastUpdate}.Guid
New-Item -Type Directory -Path "${Env:Temp}\${LastUpdateKB}" -Force | Out-Null
Save-MSCatalogUpdate -Guid ${LastUpdateGuid} -Destination "${Env:Temp}\${LastUpdateKB}"
Is there a better/faster/less-resource-consuming way of getting the latest cumulative update?
I'm having issues while using Save-MSCatalogUpdate when selecting the first item in the array. The process is asking me whether to save All files or select an individual Id (I don't know which Id is referring to), and when selecting All nothing happen and NO file is saved on the directory.
PS C:\User\> $Updates = Get-MSCatalogUpdate -Search "MT7921" -AllPages | Where-Object {$_.Title -like "*3.3.0*"}
PS C:\User\> echo $Updates[0]
Title Products Classification LastUpdated Size
----- -------- -------------- ----------- ----
MediaTek, Inc. - Net - 3.3.0.540 Windows 10, Vibranium and later, Servicing Drivers, Windows 10, Vibranium and later, Upgrade & Servicing Drivers Drivers (Networking) 2022/05/07 6.6 MB
PS C:\User> echo $Updates
Title Products Classification LastUpdated Size
----- -------- -------------- ----------- ----
MediaTek, Inc. - Net - 3.3.0.540 Windows 10, Vibranium and later, Servicing Drivers, Windows 10, Vibranium and later, Upgrade & Servicing Drivers Drivers (Networking) 2022/05/07 6.6 …
MediaTek, Inc. - Net - 3.3.0.467 Windows - Client, version 21H2 and later, Servicing Drivers, Windows - Client, version 21H2 and later, Upgrade & Servicing Drivers Drivers (Networking) 2022/02/24 6.5 …
MediaTek, Inc. - Net - 3.3.0.443 Windows - Client, version 21H2 and later, Servicing Drivers Drivers (Networking) 2022/01/27 6.5 …
MediaTek, Inc. - Net - 3.3.0.443 Windows - Client, version 21H2 and later, Servicing Drivers, Windows - Client, version 21H2 and later, Upgrade & Servicing Drivers Drivers (Networking) 2022/01/27 6.5 …
MediaTek, Inc. - Net - 3.3.0.442 Windows - Client, version 21H2 and later, Servicing Drivers, Windows - Client, version 21H2 and later, Upgrade & Servicing Drivers Drivers (Networking) 2022/01/27 6.4 …
MediaTek, Inc. - Net - 3.3.0.443 Windows 10, Vibranium and later, Servicing Drivers, Windows 10, Vibranium and later, Upgrade & Servicing Drivers Drivers (Networking) 2022/01/27 6.5 …
MediaTek, Inc. - Net - 3.3.0.442 Windows - Client, version 21H2 and later, Servicing Drivers Drivers (Networking) 2022/01/27 6.4 …
MediaTek, Inc. - Net - 3.3.0.442 Windows - Client, version 21H2 and later, Servicing Drivers, Windows - Client, version 21H2 and later, Upgrade & Servicing Drivers Drivers (Networking) 2022/01/27 6.4 …
MediaTek, Inc. - Net - 3.3.0.442 Windows - Client, version 21H2 and later, Servicing Drivers, Windows - Client, version 21H2 and later, Upgrade & Servicing Drivers Drivers (Networking) 2022/01/27 6.4 …
MediaTek, Inc. - Net - 3.3.0.442 Windows 10, Vibranium and later, Servicing Drivers, Windows 10, Vibranium and later, Upgrade & Servicing Drivers Drivers (Networking) 2022/01/27 6.4 …
MediaTek, Inc. - Net - 3.3.0.443 Windows 10, Vibranium and later, Servicing Drivers Drivers (Networking) 2022/01/27 6.5 …
MediaTek, Inc. - Net - 3.3.0.442 Windows 10, Vibranium and later, Servicing Drivers, Windows 10, Vibranium and later, Upgrade & Servicing Drivers Drivers (Networking) 2022/01/27 6.4 …
MediaTek, Inc. - Net - 3.3.0.442 Windows 10, Vibranium and later, Servicing Drivers Drivers (Networking) 2022/01/27 6.4 …
MediaTek, Inc. - Net - 3.3.0.426 Windows 10, Vibranium and later, Servicing Drivers Drivers (Networking) 2022/01/14 5.0 …
MediaTek, Inc. - Net - 3.3.0.426 Windows - Client, version 21H2 and later, Servicing Drivers, Windows - Client, version 21H2 and later, Upgrade & Servicing Drivers Drivers (Networking) 2022/01/14 5.0 …
MediaTek, Inc. - Net - 3.3.0.426 Windows - Client, version 21H2 and later, Servicing Drivers Drivers (Networking) 2022/01/14 5.0 …
MediaTek, Inc. - Net - 3.3.0.347 Windows - Client, version 21H2 and later, Servicing Drivers, Windows - Client S, version 21H2 and later, Servicing Drivers Drivers (Networking) 2021/11/18 4.9 …
MediaTek, Inc. - Net - 3.3.0.347 Windows 10, Vibranium and later, Servicing Drivers, Windows 10 S, Vibranium and later, Servicing Drivers Drivers (Networking) 2021/11/18 4.9 …
PS C:\Users\emea_jpavon> Save-MSCatalogUpdate -Update $Updates[0] -Destination ".\"
Id FileName
-- --------
Multiple files exist for this update. Enter the Id of the file to download or 'A' to download all files.: A
PS C:\User> dir *.cap
PS C:\User>
Microsoft changed the URL from http://download.windowsupdate.com to http://dl.delivery.mp.microsoft.com. Therfore a download is not eaven possible.
Files should be downloaded or produce a message indicating that they could not be found.
If zero links are found it by default assumes multiple files are available, but no links have actually been found.
Microsoft changed the base URL for there update files. RegEx needs to be updated to accommodate and add some simple logic to return a warning if no links are found,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.