A script declares `[string]$Db` (a database path) inside a `[CmdletBinding()] param()` block. Calling it with `-Db
A script declares [string]$Db (a database path) inside a [CmdletBinding()] param() block. Calling it with -Db <path> fails immediately:
无法指定参数"Db",因为它与参数"Debug"的同名参数别名冲突。(English: cannot specify parameter "Db" because it conflicts with the same-named alias of parameter "Debug".) Not one line of the script body executes.
PowerShell resolves parameter names by unique prefix, and [CmdletBinding()] (or any [Parameter()] attribute) injects the common parameters — including -Debug, -Verbose, -ErrorAction, -Force, -Confirm, -WhatIf.
-Db is a prefix of -Debug, so the binder resolves it to the common parameter first. Once bound, the explicit -Db is seen as a second alias for the same slot and the binding is rejected. It is not namespace pollution; it is the interaction between abbreviation resolution and automatically injected common parameters.
-Db, -Ve, -Er, -Fo, -Co, -Wh, -De.-DbPath, -DatabasePath, -LtmDb..\script.ps1 -DbPath <path> runs to completion, and Get-Help .\script.ps1 -Parameter * lists no name that is a prefix of a common parameter.