PowerShell

Naming Conventions

Functions

Get-User()
  • Use Verb-Noun pattern while naming a function.
  • Verb implies an action e.g. Get, Set, New, Read, Write and many more. See approved verbs.
  • Noun should be singular even if it acts on multiple items. Get-User() may return one or multiple users.
  • Use Pascal case for both Verb and Noun. E.g. Get-UserLogin()

This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow