PSResourceGet icon indicating copy to clipboard operation
PSResourceGet copied to clipboard

Please include the download number to each module result returned from `Find-PSResource`

Open daxian-dbw opened this issue 4 years ago • 1 comments

Summary of the new feature / enhancement

The download number of each result returned from Find-PSResource would be very useful when pulling data from PowerShellGallery for analysis purpose. Today, I have to search on PowerShellGelllery to find the download number, which makes it hard to automate my analysis.

Proposed technical implementation details (optional)

Each object returned from Find-PSResource should have a property TotalDownloads reflecting the number of downloads at about the time the query is done by Find-PSResource.

daxian-dbw avatar Oct 08 '21 03:10 daxian-dbw

To ask it a different way, for Find-PSResource, why aren't DownloadCount and VersionDownloadCount returned in AdditionalMetadata like they are with Find-Module?

Resource authors want to know download counts, and it also helps as a way to know the most popular resources.

For example, to use Find-Module to get the top ten most downloaded modules -

Find-Module -Repository PSGallery | select Name,@{N = 'DownloadCount'; E = {[int]$_.AdditionalMetadata.DownloadCount}} | sort DownloadCount -desc | select -first 10

Or the top ten most downloaded modules based on downloads of the current version of the module -

Find-Module -Repository PSGallery | select Name,@{N = 'VersionDownloadCount'; E = {[int]$_.AdditionalMetadata.VersionDownloadCount}} | sort VersionDownloadCount -desc | select -first 10

craiglandis avatar Jul 30 '23 01:07 craiglandis