All tracks

Programming standards

PowerShell

Production scripts, parameters, errors, modules, security and automation.

0 / 6 lessons0%
Start track
  1. 01
    Basics: cmdlets, pipeline, objectsintro

    How PowerShell works: Verb-Noun cmdlets, the object pipeline and why it isn't text.

    10 min
  2. 02
    Parameters, validation and [CmdletBinding()]core

    Typed parameters, validation attributes and advanced functions with [CmdletBinding()].

    11 min
  3. 03
    Error handling (try/catch, $ErrorActionPreference)core

    Terminating vs non-terminating errors, try/catch and $ErrorActionPreference in the ZEUS probes.

    11 min
  4. 04
    Functions, modules and reusecore

    Extracting functions, building .psm1 modules and exporting a public API in the ZEUS probes.

    11 min
  5. 05
    Security: credentials, SecureString, no passwords in codeadvanced

    PSCredential, SecureString and the rules for keeping credentials out of the ZEUS probe code.

    12 min
  6. 06
    Production automation — patterns from real ZEUS scriptsadvanced

    ZEUS probe patterns: -AsJson on stdout, paged LDAP and remote Invoke-Command over WinRM.

    14 min

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?