What is the common naming convention of PowerShell cmdlets and functions?
- Verb-Preposition-Noun
- Adverb-Verb-Noun
- Verb-Noun
- Adjective-Noun
EXPLANATION
The common naming convention of cmdlets and functions in PowerShell is "Verb-Noun".
There are 3 primary rules for naming within this convention:
- The Verb should be in the approved verb list. To get the list of approved verbs, simply type "Get-Verb" in PowerShell.
- The Noun should be singular, never plural.
- Matching Nouns should work together and with the same object types; for instance, the object you get when you run Get-<Noun> should be able to be piped to a cmdlet to Set-<Noun>.
0 comments:
Post a Comment