Last active
November 2, 2022 20:54
-
-
Save JustinGrote/e5252ddae829da67f4b621ad8f8f512f to your computer and use it in GitHub Desktop.
Get the latest version of all packages from a nuget feed that have dependencies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$items = 0..26 | ForEach-Object -ThrottleLimit 30 -Parallel { | |
$return = Invoke-RestMethod -Verbose "https://www.powershellgallery.com/api/v2/Packages()?`$filter=IsLatestVersion eq true and Dependencies%20gt%20%27a%27&`$select=Dependencies,Version,NormalizedVersion&`$orderby=Created%20desc&`$top=50000&`$skip=$($PSItem*100)" | |
$return | ForEach-Object { | |
[PSCustomObject]@{ | |
Name = $_.title.'#text' | |
Dependency = $_.Properties.Dependencies | |
Version = $_.Properties.Version | |
NormalizedVersion = $_.Properties.NormalizedVersion | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment