Getting started with PowerShell
Main
- Language Keywords and Grammar including control flow
- about Operators
- Flow Control
- about_ScriptBlocks (anonymous functions)
Grammar
Important Topics, Language quirks
For( ;; )
vs ForEach
vs ForEach-Object
- about_ForEach ( control loop)
- about_For ( control loop)
- ForEach-Object ( Note: this is a command, not a control loop )
It’s first argument is a ScriptBlock so it appears like a control loop.
Flow Control with language Keywords
Attributes for validation
- Attributes TOC
- see: ValidatePattern, ValidateLength, ValidateSet
- Parameter attribute
- Cmdlet attribute
Best Practices
- Strongly Encouraged Development Guidelines
- The PowerShell Best Practices and Style Guide <github.com/PoshCode/PowerShellPracticeAndStyle>