How should we review PowerShell scripts run through AWS SSM?

November 16, 2026 5 answers
Asked by RivetRascal

Our Windows admin scripts need code review before they can run through AWS Systems Manager documents. Reviews happen three times a week, and the reviewers don't know PowerShell. How can we make this workable without holding up routine administration?

Answers

_z74!muxbasket.3

I'd put reusable scripts and SSM document definitions in a version-controlled runbook repository. Review changes there, then deploy approved versions through a pipeline. That gives admins a catalog of reviewed operations they can run without putting the same code through a meeting every time.

For example, approve an uptime check as a reusable operation rather than reviewing each invocation. The policy would need to allow reuse of approved code, and changes to the script or its document should go back through review.

_r47+claspdrum.8:

Worth checking the parameters too. An approved script with unrestricted input could do more than the reviewer expected.

Reply to this answer
q.843!nodeclip

Find out what risk or requirement the rule is meant to address before arguing about the details. Then propose different paths for routine read-only checks and operations that change state. Read-only doesn't automatically mean harmless, so define what qualifies and what access it needs.

For changes, an automated merge gate with a required approver can replace the meeting as the default review path. Leave room for an agreed urgent process when a server is down and waiting for the next scheduled review isn't practical.

Reply to this answer
3t~syncbadge_274

A review by someone who can't read PowerShell isn't much of a technical review. Get a PowerShell-capable admin involved, even if a developer also checks the general design. Run PSScriptAnalyzer and tests as part of the review, but don't treat either as proof that a script is safe.

Reply to this answer
mIx3d.signal

Track the actual delays for a while. Record when work was requested, when review was available, how long approval took, and what work was blocked. Bring a few concrete examples to whoever owns the policy, along with a proposal for approved routine operations. That makes the tradeoff much easier to discuss than arguing over whether a single command is a script.

Reply to this answer
_j62+baudwrench.4

Review is only one control. Look at what permissions the scripts and the people invoking them have, and limit those to what the operation needs. PowerShell options such as Just Enough Administration and constrained language mode may help restrict access, but they need to be configured and tested for the environment.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions