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/PSReservedCmdletChar is a PSScriptAnalyzer diagnostic emitted by tally for PowerShell snippets embedded in Dockerfiles.
PropertyValue
SeverityError
CategoryPSScriptAnalyzer
Auto-fixNo

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

function MyFunction[1]
{...}

Correct code

function MyFunction
{...}

Source

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