Search Wiki:


TypeName FollowCmdletClassNamingConvention
CheckId PS1010
Error-Level Information
Category Microsoft.PowerShell
Certainty 95%
Cause The name of the .NET class that implements the cmdlet is not based on the cmdlet name.
Rule descriptionThe .NET class that implements a cmdlet should have a name with the format "<Verb><Noun>Command". For example, the Write-String cmdlet should be implemented by the WriteStringCommand class.
How to fix violations Change the name of the class that implements the cmdlet.
When to exclude warnings Do not suppress warnings from this rule.
Related rules DefineCmdletInTheCorrectNamespace
See also FxCop Rules for Windows PowerShell


// Example of a cmdlet that violates this rule.
    [Cmdlet("Write", "String")]
    public class MyWriteStringCmdletImplementation : PSCmdlet
        // ...

// Example of a cmdlet that follows this rule.
    [Cmdlet("Write", "String")]
    public class WriteStringCommand : PSCmdlet
        // ...

Back to FxCop Rules for Windows PowerShell.
Last edited Mar 26 2010 at 4:13 PM  by JuneB, version 1
Page view tracker