> ## 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

> Cmdlet Verbs

`powershell/PSUseApprovedVerbs` is a PSScriptAnalyzer diagnostic emitted by tally for PowerShell snippets embedded in Dockerfiles.

| Property | Value             |
| -------- | ----------------- |
| Severity | Warning           |
| Category | PSScriptAnalyzer  |
| Default  | Disabled in tally |
| Auto-fix | No                |

<Note>
  tally disables this rule by default for Dockerfile `RUN` snippets because a `RUN` executes
  statements inline rather than defining cmdlets, parameters, or modules with external callers. Re-enable it with
  `include = ["powershell/PSUseApprovedVerbs"]` or by setting
  `rules.powershell.PSUseApprovedVerbs.severity = "warning"` in `.tally.toml`.
</Note>

## 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][01]. 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

```powershell theme={null}
function Change-Item
{
    ...
}
```

### Correct code

```powershell theme={null}
function Update-Item
{
    ...
}
```

[01]: https://learn.microsoft.com/powershell/scripting/developer/cmdlet/approved-verbs-for-windows-powershell-commands

## Source

This rule documentation is adapted from Microsoft's PSScriptAnalyzer documentation for
[UseApprovedVerbs](https://github.com/MicrosoftDocs/PowerShell-Docs-Modules/blob/main/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseApprovedVerbs.md),
licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
