en-US/PSGalleryTracker-Help.xml
|
<?xml version="1.0" encoding="utf-8"?>
<helpItems xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" schema="maml" xmlns="http://msh"> <command:command> <command:details> <command:name>Get-PSGalleryStats</command:name> <maml:description> <maml:para>Reads recorded download statistics from the CSV file.</maml:para> </maml:description> <command:verb>Get</command:verb> <command:noun>PSGalleryStats</command:noun> </command:details> <maml:description> <maml:para>Reads the `PSGalleryDownloads.csv` file and returns the recorded statistics as objects. Supports filtering by module name and date range.</maml:para> <maml:para>Tab completion for `-ModuleName` suggests module names found in the CSV file. To open the CSV in Excel, use `Open-PSGalleryStats`.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-PSGalleryStats</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>After</maml:name> <maml:description> <maml:para>Return only rows recorded after this date/time.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">System.DateTime</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>Before</maml:name> <maml:description> <maml:para>Return only rows recorded before this date/time.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">System.DateTime</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0" aliases="none"> <maml:name>ModuleName</maml:name> <maml:description> <maml:para>Filter results to a specific module. Tab completion suggests module names found in the CSV file.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">System.String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>After</maml:name> <maml:description> <maml:para>Return only rows recorded after this date/time.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">System.DateTime</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>Before</maml:name> <maml:description> <maml:para>Return only rows recorded before this date/time.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">System.DateTime</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0" aliases="none"> <maml:name>ModuleName</maml:name> <maml:description> <maml:para>Filter results to a specific module. Tab completion suggests module names found in the CSV file.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">System.String</command:parameterValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <dev:name>None</dev:name> </dev:type> <maml:description> <maml:para /> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <dev:name>PSCustomObject</dev:name> </dev:type> <maml:description> <maml:para>Objects with Date, ModuleName, LatestVersion, and TotalDownloads properties. TotalDownloads is returned as `[long]` for proper numeric sorting.</maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>The CSV file must exist before calling this command. Run `Update-PSGalleryStats` first to create it.</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1: Show all recorded statistics ---------</maml:title> <maml:introduction> <maml:para>```powershell Get-PSGalleryStats ```</maml:para> <maml:para>Returns all rows from the CSV file.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 2: Filter by module name ---------</maml:title> <maml:introduction> <maml:para>```powershell Get-PSGalleryStats PowerShell.MCP ```</maml:para> <maml:para>Returns only the rows for PowerShell.MCP. Tab completion is available.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 3: Filter by date range ---------</maml:title> <maml:introduction> <maml:para>```powershell Get-PSGalleryStats -After '2026-03-01' -Before '2026-03-15' ```</maml:para> <maml:para>Returns rows recorded between the specified dates.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 4: Combine module name and date filter ---------</maml:title> <maml:introduction> <maml:para>```powershell Get-PSGalleryStats PowerShell.MCP -After '2026-03-01' ```</maml:para> <maml:para>Returns rows for PowerShell.MCP recorded after the specified date.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <command:uri /> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>Open-PSGalleryStats</command:name> <maml:description> <maml:para>Opens the download statistics CSV file in Excel.</maml:para> </maml:description> <command:verb>Open</command:verb> <command:noun>PSGalleryStats</command:noun> </command:details> <maml:description> <maml:para>Opens `PSGalleryDownloads.csv` in the default application associated with `.csv` files (typically Excel). Use this to create pivot tables and charts from the recorded data.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Open-PSGalleryStats</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0" aliases="none"> <maml:name>Path</maml:name> <maml:description> <maml:para>Path to the CSV file. Defaults to `$HOME\.PSGalleryTracker\PSGalleryDownloads.csv`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">System.String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0" aliases="none"> <maml:name>Path</maml:name> <maml:description> <maml:para>Path to the CSV file. Defaults to `$HOME\.PSGalleryTracker\PSGalleryDownloads.csv`.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">System.String</command:parameterValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <dev:name>None</dev:name> </dev:type> <maml:description> <maml:para /> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <dev:name>None</dev:name> </dev:type> <maml:description> <maml:para /> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>The CSV file must exist before calling this command. Run `Update-PSGalleryStats` first to create it.</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1: Open the default CSV file ---------</maml:title> <maml:introduction> <maml:para>```powershell Open-PSGalleryStats ```</maml:para> <maml:para>Opens `$HOME\.PSGalleryTracker\PSGalleryDownloads.csv` in Excel.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 2: Open a custom CSV file ---------</maml:title> <maml:introduction> <maml:para>```powershell Open-PSGalleryStats -Path C:\Data\MyStats.csv ```</maml:para> <maml:para>Opens the specified CSV file.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <command:uri /> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>Register-PSGalleryModule</command:name> <maml:description> <maml:para>Registers PowerShell Gallery modules for download tracking.</maml:para> </maml:description> <command:verb>Register</command:verb> <command:noun>PSGalleryModule</command:noun> </command:details> <maml:description> <maml:para>Adds one or more modules to the tracking list stored in `$HOME\.PSGalleryTracker\Modules.txt`. When called without arguments, displays the current list of registered modules.</maml:para> <maml:para>Module names are automatically resolved to their correct casing via the PowerShell Gallery API. For example, `powershell.mcp` is stored as `PowerShell.MCP`.</maml:para> <maml:para>Wildcard patterns are supported. `Register-PSGalleryModule Speech.*` registers all installed modules matching `Speech.*` that are published on PowerShell Gallery.</maml:para> <maml:para>Tab completion suggests installed modules that are not yet registered.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Register-PSGalleryModule</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>Confirm</maml:name> <maml:description> <maml:para>Prompts you for confirmation before running the cmdlet.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">System.Management.Automation.SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="true" pipelineInput="false" position="0" aliases="none"> <maml:name>ModuleName</maml:name> <maml:description> <maml:para>The name of the module(s) to register for tracking. Accepts wildcard patterns to register multiple modules at once (e.g., `Speech.*`). When omitted, the command lists all currently registered modules.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>WhatIf</maml:name> <maml:description> <maml:para>Runs the command in a mode that only reports what would happen without performing the actions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">System.Management.Automation.SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>Confirm</maml:name> <maml:description> <maml:para>Prompts you for confirmation before running the cmdlet.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">System.Management.Automation.SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="true" pipelineInput="false" position="0" aliases="none"> <maml:name>ModuleName</maml:name> <maml:description> <maml:para>The name of the module(s) to register for tracking. Accepts wildcard patterns to register multiple modules at once (e.g., `Speech.*`). When omitted, the command lists all currently registered modules.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>WhatIf</maml:name> <maml:description> <maml:para>Runs the command in a mode that only reports what would happen without performing the actions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">System.Management.Automation.SwitchParameter</command:parameterValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <dev:name>System.String</dev:name> </dev:type> <maml:description> <maml:para>You can pipe module names to this cmdlet.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <dev:name>System.String</dev:name> </dev:type> <maml:description> <maml:para>When called without arguments, returns the list of registered module names.</maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>The tracking list is stored in `$HOME\.PSGalleryTracker\Modules.txt`, one module name per line. Module names are resolved to their canonical casing via the PowerShell Gallery API at registration time. If a module is not found on the Gallery, it is registered as-is with a warning.</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1: Register a single module ---------</maml:title> <maml:introduction> <maml:para>```powershell Register-PSGalleryModule PowerShell.MCP ```</maml:para> <maml:para>Adds PowerShell.MCP to the tracking list.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 2: Register multiple modules ---------</maml:title> <maml:introduction> <maml:para>```powershell Register-PSGalleryModule PowerShell.MCP, QiitaDrive, ScreenRecorder ```</maml:para> <maml:para>Adds three modules to the tracking list in one command.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 3: Register modules with a wildcard ---------</maml:title> <maml:introduction> <maml:para>```powershell Register-PSGalleryModule Speech.* ```</maml:para> <maml:para>Registers all installed modules matching `Speech.*` that are published on PowerShell Gallery.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 4: Preview registration with -WhatIf ---------</maml:title> <maml:introduction> <maml:para>```powershell Register-PSGalleryModule Speech.* -WhatIf ```</maml:para> <maml:para>Shows which modules would be registered without actually modifying the tracking list.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 5: List registered modules ---------</maml:title> <maml:introduction> <maml:para>```powershell Register-PSGalleryModule ```</maml:para> <maml:para>Displays the current list of registered modules when called without arguments.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <command:uri /> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>Unregister-PSGalleryModule</command:name> <maml:description> <maml:para>Removes modules from the download tracking list.</maml:para> </maml:description> <command:verb>Unregister</command:verb> <command:noun>PSGalleryModule</command:noun> </command:details> <maml:description> <maml:para>Removes one or more modules from the tracking list stored in `$HOME\.PSGalleryTracker\Modules.txt`. Module name matching is case-insensitive. Wildcard patterns are supported.</maml:para> <maml:para>Tab completion suggests currently registered module names.</maml:para> <maml:para>Existing CSV data is not deleted. Only the tracking list is modified, so `Update-PSGalleryStats` will no longer fetch stats for the unregistered modules.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Unregister-PSGalleryModule</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>Confirm</maml:name> <maml:description> <maml:para>Prompts you for confirmation before running the cmdlet.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">System.Management.Automation.SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="true" pipelineInput="false" position="0" aliases="none"> <maml:name>ModuleName</maml:name> <maml:description> <maml:para>The name of the module(s) to remove from the tracking list. Accepts wildcard patterns (e.g., `Speech.*`). Case-insensitive.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>WhatIf</maml:name> <maml:description> <maml:para>Runs the command in a mode that only reports what would happen without performing the actions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">System.Management.Automation.SwitchParameter</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>Confirm</maml:name> <maml:description> <maml:para>Prompts you for confirmation before running the cmdlet.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">System.Management.Automation.SwitchParameter</command:parameterValue> </command:parameter> <command:parameter required="true" variableLength="false" globbing="true" pipelineInput="false" position="0" aliases="none"> <maml:name>ModuleName</maml:name> <maml:description> <maml:para>The name of the module(s) to remove from the tracking list. Accepts wildcard patterns (e.g., `Speech.*`). Case-insensitive.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>WhatIf</maml:name> <maml:description> <maml:para>Runs the command in a mode that only reports what would happen without performing the actions.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">System.Management.Automation.SwitchParameter</command:parameterValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <dev:name>System.String</dev:name> </dev:type> <maml:description> <maml:para>You can pipe module names to this cmdlet.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <dev:name>None</dev:name> </dev:type> <maml:description> <maml:para>This cmdlet produces no output.</maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Only the tracking list (`Modules.txt`) is modified. Previously recorded CSV data is preserved.</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1: Unregister a single module ---------</maml:title> <maml:introduction> <maml:para>```powershell Unregister-PSGalleryModule Speech ```</maml:para> <maml:para>Removes Speech from the tracking list.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 2: Unregister multiple modules with a wildcard ---------</maml:title> <maml:introduction> <maml:para>```powershell Unregister-PSGalleryModule Speech.* ```</maml:para> <maml:para>Removes all registered modules matching `Speech.*`.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 3: Preview with -WhatIf ---------</maml:title> <maml:introduction> <maml:para>```powershell Unregister-PSGalleryModule Speech.* -WhatIf ```</maml:para> <maml:para>Shows which modules would be unregistered without modifying the tracking list.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <command:uri /> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>Update-PSGalleryStats</command:name> <maml:description> <maml:para>Fetches current download statistics for all registered modules and appends them to the CSV file.</maml:para> </maml:description> <command:verb>Update</command:verb> <command:noun>PSGalleryStats</command:noun> </command:details> <maml:description> <maml:para>Queries the PowerShell Gallery API for each module in the tracking list and appends a row to `PSGalleryDownloads.csv` with the date, module name, latest version, and total download count.</maml:para> <maml:para>This is the main command for daily tracking. Run it periodically (manually or via Task Scheduler) to build up a time series of download statistics. The CSV file is BOM-prefixed UTF-8 so that Excel can open it directly without character encoding issues.</maml:para> <maml:para>Each row contains: `Date,ModuleName,LatestVersion,TotalDownloads`. The date is UTC. When a new version is released, the LatestVersion column changes, making it easy to identify release dates in the data.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Update-PSGalleryStats</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0" aliases="none"> <maml:name>Path</maml:name> <maml:description> <maml:para>Path to the CSV file. Defaults to `$HOME\.PSGalleryTracker\PSGalleryDownloads.csv`. The file and parent directory are created automatically if they do not exist.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">System.String</command:parameterValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0" aliases="none"> <maml:name>Path</maml:name> <maml:description> <maml:para>Path to the CSV file. Defaults to `$HOME\.PSGalleryTracker\PSGalleryDownloads.csv`. The file and parent directory are created automatically if they do not exist.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">System.String</command:parameterValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <dev:name>None</dev:name> </dev:type> <maml:description> <maml:para /> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <dev:name>PSCustomObject</dev:name> </dev:type> <maml:description> <maml:para>For each module, returns an object with Date, ModuleName, LatestVersion, and TotalDownloads properties. This output can be piped to `Format-Table` or other formatting commands.</maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Modules must be registered with `Register-PSGalleryModule` before running this command. Module names are resolved to their canonical casing from the Gallery API response.</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1: Update all registered modules ---------</maml:title> <maml:introduction> <maml:para>```powershell Update-PSGalleryStats ```</maml:para> <maml:para>Fetches stats for all registered modules and appends to the default CSV file.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 2: Save to a custom CSV file ---------</maml:title> <maml:introduction> <maml:para>```powershell Update-PSGalleryStats -Path C:\Data\MyStats.csv ```</maml:para> <maml:para>Appends stats to the specified CSV file instead of the default location.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 3: Typical daily workflow ---------</maml:title> <maml:introduction> <maml:para>```powershell Register-PSGalleryModule PowerShell.MCP, QiitaDrive # one-time setup Update-PSGalleryStats # run daily Get-PSGalleryStats # review data Get-PSGalleryStats -Open # open in Excel ```</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <command:uri /> </maml:navigationLink> </command:relatedLinks> </command:command> </helpItems> |