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

> Reserved Cmdlet Chars

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

| Property | Value             |
| -------- | ----------------- |
| Severity | Error             |
| 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/PSReservedCmdletChar"]` or by setting
  `rules.powershell.PSReservedCmdletChar.severity = "warning"` in `.tally.toml`.
</Note>

## Description

You cannot use following reserved characters in a function or cmdlet name as these can cause parsing
or runtime errors.

Reserved Characters include: ``#,(){}[]&/\\$^;:\"'<>|?@`*%+=~``

## How

Remove reserved characters from names.

## Examples

### Problematic code

```powershell theme={null}
function MyFunction[1]
{...}
```

### Correct code

```powershell theme={null}
function MyFunction
{...}
```

## Source

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