Can I create a script with parameter that has [alias("db")] in Powershell?

Viewed 8596

If I define the following

[parameter(Mandatory = $true)]
[alias("db")]
[string]$database,

then I get an error

Parameter alias cannot be specified because an alias with the name 'db'
was defined multiple times for the command.

Which is true, since db is already an alias for the universal -Debug parameter.
Is it possible to define this alias without renaming the parameter?

2 Answers
Related