AvoidMultipleTypeAttributes
Severity Level: Warning
Description
Parameters should not have more than one type specifier. Multiple type specifiers on parameters can cause runtime errors.
How
Ensure each parameter has only 1 type specifier.
Example
Wrong
function Test-Script
{
[CmdletBinding()]
Param
(
[switch]
[int]
$Switch
)
}
Correct
function Test-Script
{
[CmdletBinding()]
Param
(
[switch]
$Switch
)
}
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for