Instruction file imported from Azure/bicep-ptn-aiml-landing-zone (
.github/instructions/powershell.instructions.md). Copyright stays with the author.
PowerShell and azd automation
- Target PowerShell 7 for shared scripts unless
install.ps1requires Windows PowerShell compatibility under Custom Script Extension. - Keep azd Windows and POSIX hooks behaviorally identical through their shared PowerShell command.
- Quote paths and external input; do not print secrets or private validation environment names.
- Fail explicitly on unmet prerequisites and non-transient errors. Do not return success-shaped fallbacks.
- Preserve idempotency,
SupportsShouldProcess, and-WhatIfbehavior where present. - Preserve
install.ps1wall-clock budgets, bounded operations, process-tree cleanup, and fatal-versus-optional step behavior. - Add deterministic tests for parsing, validation, and branching logic.
- Load
documentation-consistencywhen operator commands or deployment flow change.