← Docs home

Make Cmdlets Case-Insensitive and Case-Preserving

📐 Guideline.

PowerShell is case-insensitive by default, but because it deals with many preexisting systems, it preserves case for ease of operation and compatibility. If a character is supplied in uppercase letters, PowerShell keeps it in uppercase. A cmdlet should follow this convention: operate in a case-insensitive way where possible, but preserve the original case for cmdlets that occur later in a command or in the pipeline.