Skip to content

Require full parameter names and standard parameter naming; avoid positional arguments #6

Description

Context

The PowerShell standard already requires full cmdlet names (never aliases) and Verb-Noun naming with approved verbs.

Gap

The calling-side and parameter-naming conventions are missing:

  • When calling a command in shared code, use full parameter names and avoid positional arguments — explicit names survive parameter-set changes and read clearly to someone who does not know the command.
  • Name your own parameters to match PowerShell's built-ins (ComputerName, Path, Name), not ad-hoc names like $Param_Computer or $InstanceName.

Proposed change

Add these to the PowerShell standard's "Shared conventions" (index.md) and/or the Functions.md parameters section, alongside the existing "full cmdlet names, never aliases" rule.

Source

PoshCode — Style Guide "Naming Conventions" and Best Practices TOOL-05; Microsoft PowerShell-Docs style guide, "Using parameters in examples".

Acceptance

The standard requires full parameter names, discourages positional arguments in shared code, and requires standard PowerShell parameter names.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions