Skip to content

Instantly share code, notes, and snippets.

@lazywinadmin
Last active September 4, 2019 05:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lazywinadmin/90b458383fc7ec49d4922b9f17157e9c to your computer and use it in GitHub Desktop.
Save lazywinadmin/90b458383fc7ec49d4922b9f17157e9c to your computer and use it in GitHub Desktop.
# Option 1
invoke-restmethod -method Get -URI "https://www.powershellgallery.com/api/v2/Search()?`$filter=(startswith(Id,'PSClass') and IsLatestVersion) or (startswith(Id,'Adsi') and IsLatestVersion)"|
select -expand properties|select -expand downloadcount
# Option 2
$a = find-module az
$a.AdditionalMetadata.Downloadcount # total download
$a.AdditionalMetadata.versionDownloadCount # download for current version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment