Skip to content

Fixes #453 - Improve description of the Settings parameter - #454

Merged
Sean Wheeler (sdwheeler) merged 2 commits into
MicrosoftDocs:mainfrom
sdwheeler:sdw-w627449-i453
Aug 24, 2026
Merged

Fixes #453 - Improve description of the Settings parameter#454
Sean Wheeler (sdwheeler) merged 2 commits into
MicrosoftDocs:mainfrom
sdwheeler:sdw-w627449-i453

Conversation

@sdwheeler

@sdwheeler Sean Wheeler (sdwheeler) commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

PR Summary

Improve description of the Settings parameter

PR Checklist

  • Descriptive Title: This PR's title is a synopsis of the changes it proposes.
  • Summary: This PR's summary describes the scope and intent of the change.
  • Contributor's Guide: I have read the contributors guide.
  • Style: This PR adheres to the style guide.

Copilot AI lite review requested due to automatic review settings August 24, 2026 14:44
@learn-build-service-prod

Copy link
Copy Markdown

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates PSScriptAnalyzer documentation to clarify what the -Settings parameter accepts (including built-in presets) and refreshes several cmdlet reference pages to newer PlatyPS front matter/schema.

Changes:

  • Expands -Settings parameter documentation to include built-in preset names and adds a preset list.
  • Updates cmdlet reference page front matter/schema (HelpUri, PlatyPS schema version, Inputs/Outputs formatting).
  • Updates the conceptual “Using PSScriptAnalyzer” article with additional guidance and examples around presets/settings.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
reference/ps-modules/PSScriptAnalyzer/Invoke-ScriptAnalyzer.md Updates cmdlet reference content, including revised -Settings documentation and preset list.
reference/ps-modules/PSScriptAnalyzer/Invoke-ScriptAnalyzer.md.bak Adds a backup copy of the cmdlet doc (appears unintended).
reference/ps-modules/PSScriptAnalyzer/Invoke-Formatter.md Updates cmdlet reference front matter/schema and structured metadata sections.
reference/ps-modules/PSScriptAnalyzer/Invoke-Formatter.md.bak Adds a backup copy of the cmdlet doc (appears unintended).
reference/ps-modules/PSScriptAnalyzer/Get-ScriptAnalyzerRule.md Updates cmdlet reference front matter/schema and structured metadata sections.
reference/ps-modules/PSScriptAnalyzer/Get-ScriptAnalyzerRule.md.bak Adds a backup copy of the cmdlet doc (appears unintended).
reference/docs-conceptual/PSScriptAnalyzer/using-scriptanalyzer.md Updates conceptual guidance for settings/presets, including listing preset files and examples.
Suppressed comments (7)

reference/ps-modules/PSScriptAnalyzer/Invoke-ScriptAnalyzer.md:628

  • -Settings documentation currently states that invalid values are ignored and that multiple presets can be specified via a comma-separated list. In PSScriptAnalyzer, Settings is a single object (preset name OR file path OR hashtable); unknown preset names are treated as a file path and ultimately error rather than being silently ignored.
The parameters and values in the profile take precedence over the same parameter and values
specified at the command line. Invalid values are ignored. You can specify multiple presets by
separating them with a comma. You can use tab completion to see the available presets.

reference/ps-modules/PSScriptAnalyzer/Invoke-ScriptAnalyzer.md:793

  • The NOTES section repeats that multiple presets can be specified via a comma-separated list. If presets aren't composable this way, this sentence is misleading and should be removed.
You can specify multiple presets by separating them with a comma. You can use tab completion to see
the available presets.

reference/ps-modules/PSScriptAnalyzer/Invoke-ScriptAnalyzer.md:748

  • Minor grammar issue: "accept a string values" should be singular/plural consistent.
The **Path** and **ScriptDefinition** parameters accept a string values from the pipeline.

reference/docs-conceptual/PSScriptAnalyzer/using-scriptanalyzer.md:188

  • The sample output includes a specific username/module path ("C:\Users\sewhee\..."). Docs should avoid personal/user-specific paths; use placeholders to keep the example generic.
    Directory: C:\Users\sewhee\Documents\PowerShell\Modules\psscriptAnalyzer\1.25.0\Settings

reference/ps-modules/PSScriptAnalyzer/Invoke-Formatter.md:182

  • Minor spacing issue: there is an extra space in "accepts input from the pipeline".
The **Range** parameter accepts input  from the pipeline.

reference/docs-conceptual/PSScriptAnalyzer/using-scriptanalyzer.md:181

  • -Settings accepts a single preset name (or a file path/hashtable). Saying multiple presets can be specified via comma-separated values is misleading here and should be removed.
You can specify multiple presets by separating them with a comma. You can use tab completion to see
the available presets. The built-in presets are stored in the `Settings` folder of the
**PSScriptAnalyzer** module. You can list the built-in presets by running the following command:

reference/docs-conceptual/PSScriptAnalyzer/using-scriptanalyzer.md:184

  • The Get-ChildItem example has redundant $() nesting; this makes the example harder to read and doesn't change behavior.
Get-ChildItem "$($(Get-Module PSScriptAnalyzer).ModuleBase)\Settings\*.psd1"

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread reference/ps-modules/PSScriptAnalyzer/Invoke-ScriptAnalyzer.md Outdated
Comment thread reference/docs-conceptual/PSScriptAnalyzer/using-scriptanalyzer.md Outdated
Comment thread reference/ps-modules/PSScriptAnalyzer/Invoke-Formatter.md Outdated
Comment on lines +1 to +7
---
external help file: Microsoft.Windows.PowerShell.ScriptAnalyzer.dll-Help.xml
Module Name: PSScriptAnalyzer
ms.date: 07/23/2026
online version: https://learn.microsoft.com/powershell/module/psscriptanalyzer/invoke-scriptanalyzer?view=ps-modules&wt.mc_id=ps-gethelp
schema: 2.0.0
---
Comment on lines +1 to +7
---
external help file: Microsoft.Windows.PowerShell.ScriptAnalyzer.dll-Help.xml
Module Name: PSScriptAnalyzer
ms.date: 10/07/2021
online version: https://learn.microsoft.com/powershell/module/psscriptanalyzer/invoke-formatter?view=ps-modules&wt.mc_id=ps-gethelp
schema: 2.0.0
---
Comment on lines +1 to +7
---
external help file: Microsoft.Windows.PowerShell.ScriptAnalyzer.dll-Help.xml
Module Name: PSScriptAnalyzer
ms.date: 12/12/2024
online version: https://learn.microsoft.com/powershell/module/psscriptanalyzer/get-scriptanalyzerrule?view=ps-modules&wt.mc_id=ps-gethelp
schema: 2.0.0
---
Comment thread reference/ps-modules/PSScriptAnalyzer/Get-ScriptAnalyzerRule.md Outdated
@learn-build-service-prod

Copy link
Copy Markdown

Learn Build status updates of commit 28cd141:

✅ Validation status: passed

File Status Preview URL Details
reference/docs-conceptual/PSScriptAnalyzer/using-scriptanalyzer.md ✅Succeeded View (ps-modules)
reference/ps-modules/PSScriptAnalyzer/Get-ScriptAnalyzerRule.md ✅Succeeded View (ps-modules)
reference/ps-modules/PSScriptAnalyzer/Invoke-Formatter.md ✅Succeeded View (ps-modules)
reference/ps-modules/PSScriptAnalyzer/Invoke-ScriptAnalyzer.md ✅Succeeded View (ps-modules)

For more details, please refer to the build report.

@learn-build-service-prod

Copy link
Copy Markdown

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@sdwheeler
Sean Wheeler (sdwheeler) merged commit 46562ed into MicrosoftDocs:main Aug 24, 2026
4 checks passed
@sdwheeler
Sean Wheeler (sdwheeler) deleted the sdw-w627449-i453 branch August 24, 2026 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invoke-ScriptAnalyzer: "-Settings" Parameter: Contradicts the "Using PSScriptAnalyzer" page

2 participants