en-US/about_PSGalleryTracker.help.txt

---
title: about_PSGalleryTracker
---
 
# about_PSGalleryTracker
 
## Short Description
Track PowerShell Gallery download statistics over time for any published module.
 
## Long Description
PSGalleryTracker registers PowerShell Gallery modules for tracking, fetches their
download statistics via the Gallery API, and stores the data in a CSV file for
time-series analysis. Designed for module authors and maintainers who want to
monitor adoption metrics.
 
## Quick Start
 
```powershell
# Register modules for tracking (one-time setup)
Register-PSGalleryModule PowerShell.MCP, QiitaDrive
 
# Fetch current stats and append to CSV
Update-PSGalleryStats
 
# View recorded data
Get-PSGalleryStats
 
# Open CSV in Excel for pivot tables and charts
Open-PSGalleryStats
```
 
## Workflow
 
1. **Register** — `Register-PSGalleryModule` adds module names to the tracking list
   (`$HOME\.PSGalleryTracker\Modules.txt`). Module names are resolved to their canonical
   casing via the Gallery API. Wildcard patterns and tab completion are supported.
 
2. **Update** — `Update-PSGalleryStats` queries the PowerShell Gallery API for each
   registered module and appends a row to `PSGalleryDownloads.csv` with the date (UTC),
   module name, latest version, and total download count. Run this command daily to build
   up a time series.
 
3. **View** — `Get-PSGalleryStats` reads the CSV file and returns the data as objects.
   Filter by module name (`-ModuleName`) and/or date range (`-After`, `-Before`).
 
4. **Open** — `Open-PSGalleryStats` opens the CSV file in Excel for pivot tables and charts.
 
5. **Unregister** — `Unregister-PSGalleryModule` removes modules from the tracking list.
   Previously recorded CSV data is preserved.
 
## Data Storage
 
All data is stored in `$HOME\.PSGalleryTracker`:
 
- `Modules.txt` — one registered module name per line.
- `PSGalleryDownloads.csv` — BOM-prefixed UTF-8 CSV with columns:
  `Date,ModuleName,LatestVersion,TotalDownloads`.
 
Use the `-Path` parameter on `Update-PSGalleryStats` to specify a custom CSV file location.
 
## Pipeline Support
 
```powershell
# Register modules from the pipeline
'PowerShell.MCP', 'QiitaDrive' | Register-PSGalleryModule
 
# Filter stats for a specific module and date range
Get-PSGalleryStats PowerShell.MCP -After (Get-Date).AddDays(-30)
```