A script version is a release identifier recorded in a script's metadata to distinguish one published revision from another.
A version is a release identifier recorded in module metadata or a script file header. It distinguishes published revisions so users can obtain or recognize an updated release. section 16.3.1section 22.6.4
Use versions to make publishing changes visible and manageable:
Set ModuleVersion in a manifest generated with New-ModuleManifest; use standard W.X.Y.Z notation, such as 1.0.0. section 16.3.1section 22.4.2
Increment the version whenever you improve a module or fix bugs, allowing users to retrieve the newest release with Update-Module. section 22.5.1
Change a published script's file-info header before running Publish-Script again. section 22.6.4
Treat published versions as lasting records: hide an obsolete version from search results rather than deleting it. section 22.5.1section 22.6.4
A small release change
A module initially declares ModuleVersion = '1.0.0'. After a bug fix, update the manifest to a new version before republishing; users can then use Update-Module to obtain the latest release. section 22.4.2section 22.5.1
How Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools covers it
How deep it goes
Explains where to record versions, when to increment them, and how to hide prior releases, without detailing a complete release policy.
Examples
Uses 1.0.0, manifest ModuleVersion, script file-info headers, republishing, and hiding versions from gallery search results.
What it assumes
Assumes familiarity with PowerShell modules or scripts, manifests, and publishing commands such as Publish-Script.
What you can do after
Operate publishing workflows by updating metadata, republishing revisions, retrieving releases, and hiding obsolete versions.
How it connects
Connects versions with module manifests, semantic versioning, PowerShell Gallery, Update-Module, Publish-Script, and version history.
Go in Action, Second EditionA version number is an identifier representing a particular software release or state, often communicating its compatibility or maturity.
Kubernetes in Action, Second EditionAn API version identifies a versioned Kubernetes API schema for a resource kind, including its available fields and default values.
version pinningconfigured by · Version pinning fixes a software dependency, tool, or other component to a specified version or immutable identifier rather than allowing its version to change automatically.
calculation phaseproduced by · The calculation phase is the phase of a mutation that computes the next version of system data without advancing the current state.
Azure CLIused by · Azure CLI is Microsoft’s cross-platform command-line interface for creating, configuring, and managing Azure resources and services.
requirements.txtconfigured by · requirements.txt is a conventional text file that specifies Python project dependencies and may include version constraints or package sources.
This explainer was generated by Manning's knowledge graph from the text of Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools. The section links point to the parts of the book it draws on.