Skip to main content

Documentation Index

Fetch the complete documentation index at: https://tally.wharflab.com/llms.txt

Use this file to discover all available pages before exploring further.

powershell/PSUseApprovedVerbs is a PSScriptAnalyzer diagnostic emitted by tally for PowerShell snippets embedded in Dockerfiles.
PropertyValue
SeverityWarning
CategoryPSScriptAnalyzer
Auto-fixNo

Description

All cmdlets must use approved verbs. Approved verbs can be found by running the command Get-Verb. For more information about approved verbs, see Approved Verbs for PowerShell Commands. Some unapproved verbs are documented on the approved verbs page and point to approved alternatives. Try searching for the verb you used to find its approved form. For example, searching for Read, Open, or Search leads you to Get.

How

Change the verb in the cmdlet’s name to an approved verb.

Examples

Problematic code

function Change-Item
{
    ...
}

Correct code

function Update-Item
{
    ...
}

Source

This rule documentation is adapted from Microsoft’s PSScriptAnalyzer documentation for UseApprovedVerbs, licensed under CC BY 4.0.