Fix PSScriptAnalyzer findings and add remediation safety improvements - #1
Merged
Merged
Conversation
- Fix missing closing parenthesis in Log-Action string subexpression (08_Remediation.ps1:52) — one typo caused 9 cascading parse errors - Wrap foreach-pipe patterns in $(...) in 4 scripts to resolve EmptyPipeElement warnings (foreach keyword cannot feed a pipeline directly) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When run without parameters, the script now shows a warning about destructive/irreversible actions and requires explicit confirmation before proceeding, then presents a numbered menu to select and configure a remediation action interactively. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
)inLog-Actionstring subexpression (08_Remediation.ps1:52) — one typo caused 9 cascading parse errorsforeach-to-pipeline patterns in$(...)in02,03,04,05scripts to resolveEmptyPipeElementwarnings08_Remediation.ps1:yesgate — script exits immediately if not confirmedTest plan
.\08_Remediation.ps1with no args — warning banner displays, menu appears after confirmationnoat the confirmation prompt — script exits with "No changes made"0from the menu — exits cleanly-KillPID 9999— warning still shows, skips menu, runs action directly🤖 Generated with Claude Code