Programming standards
PowerShell
Production scripts, parameters, errors, modules, security and automation.
- 0110 minBasics: cmdlets, pipeline, objectsintro
How PowerShell works: Verb-Noun cmdlets, the object pipeline and why it isn't text.
- 0211 minParameters, validation and [CmdletBinding()]core
Typed parameters, validation attributes and advanced functions with [CmdletBinding()].
- 0311 minError handling (try/catch, $ErrorActionPreference)core
Terminating vs non-terminating errors, try/catch and $ErrorActionPreference in the ZEUS probes.
- 0411 minFunctions, modules and reusecore
Extracting functions, building .psm1 modules and exporting a public API in the ZEUS probes.
- 0512 minSecurity: credentials, SecureString, no passwords in codeadvanced
PSCredential, SecureString and the rules for keeping credentials out of the ZEUS probe code.
- 0614 minProduction automation — patterns from real ZEUS scriptsadvanced
ZEUS probe patterns: -AsJson on stdout, paged LDAP and remote Invoke-Command over WinRM.
Check your knowledge — quiz
5 questions · pass mark 80%. Score saved locally.
1.What does PowerShell pass through the pipeline between cmdlets?
2.Which attribute turns a function into an advanced one (with -Verbose, etc.)?
3.How do the ZEUS probe scripts hand the result to the agent?
4.How do you fetch a WHOLE large domain from LDAP (above MaxPageSize)?
5.Where do we NOT keep passwords in PowerShell scripts?