Skip to content

Add tool list export to temp file for drift detection#2576

Open
hallipr wants to merge 9 commits intomainfrom
users/pahallis/tools-json
Open

Add tool list export to temp file for drift detection#2576
hallipr wants to merge 9 commits intomainfrom
users/pahallis/tools-json

Conversation

@hallipr
Copy link
Copy Markdown
Member

@hallipr hallipr commented May 4, 2026

What does this PR do?

Refactoring command and options code has the potential to create unintentional drift in the tool metadata. Storing a definitive tool list for each server ensures that new PRs don't change runtime tool metadata without a corresponding change to a reviewable file in the repo.

This pull request introduces a new --include-hidden option to the tools list command, updates the code analysis and formatting workflow, and improves automation for maintaining up-to-date tools.json metadata files. The documentation is updated to reflect these changes and to guide contributors on the new workflow.

Command-line enhancements:

  • Added a new --include-hidden option to the tools list command, allowing users to include hidden commands in the output. This involved updating ToolsListOptionDefinitions, ToolsListOptions, and the logic in ToolsListCommand to filter commands based on the new option. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

Automation and tooling improvements:

  • Enhanced the Analyze-Code.ps1 script to support a -Fix flag, which now auto-fixes formatting, updates solution files, regenerates tools.json, and runs other checks. The script can also verify-only (as in CI) or apply fixes locally. [1] [2]
  • Added a new Update-ToolsList.ps1 script to automate regeneration and verification of tools.json metadata files for each server, using the tools list --include-hidden command.

Documentation updates:

  • Updated contributor documentation (CONTRIBUTING.md and servers/Azure.Mcp.Server/docs/new-command.md) to instruct contributors to use Analyze-Code.ps1 -Fix instead of manual formatting and spelling commands, and to explain the new automation workflow. [1] [2] [3]

GitHub issue number?

[Link to the GitHub issue this PR addresses]

Pre-merge Checklist

  • Required for All PRs
    • Read contribution guidelines
    • PR title clearly describes the change
    • Commit history is clean with descriptive messages (cleanup guide)
    • Added comprehensive tests for new/modified functionality
    • Created a changelog entry if the change falls among the following: new feature, bug fix, UI/UX update, breaking change, or updated dependencies. Follow the changelog entry guide
  • For MCP tool changes:
    • One tool per PR: This PR adds or modifies only one MCP tool for faster review cycles
    • Updated servers/Azure.Mcp.Server/README.md and/or servers/Fabric.Mcp.Server/README.md documentation
    • Validate README.md changes running the script ./eng/scripts/Process-PackageReadMe.ps1. See Package README
    • For new or modified tool descriptions, ran ToolDescriptionEvaluator and obtained a score of 0.4 or more and a top 3 ranking for all related test prompts
    • For tools with new names, including new tools or renamed tools, update consolidated-tools.json
    • For renamed tools, follow the Tool Rename Checklist and tag the PR with the breaking-change label
    • For new tools associated with Azure services or publicly available tools/APIs/products, add URL to documentation in the PR description
  • Extra steps for Azure MCP Server tool changes:
    • Updated command list in servers/Azure.Mcp.Server/docs/azmcp-commands.md
    • Ran ./eng/scripts/Update-AzCommandsMetadata.ps1 to update tool metadata in azmcp-commands.md (required for CI)
    • Updated test prompts in servers/Azure.Mcp.Server/docs/e2eTestPrompts.md
    • 👉 For Community (non-Microsoft team member) PRs:
      • Security review: Reviewed code for security vulnerabilities, malicious code, or suspicious activities before running tests (crypto mining, spam, data exfiltration, etc.)
      • Manual tests run: added comment /azp run mcp - pullrequest - live to run Live Test Pipeline

Copilot AI review requested due to automatic review settings May 4, 2026 19:42
@hallipr hallipr requested review from a team as code owners May 4, 2026 19:42
@github-project-automation github-project-automation Bot moved this to Untriaged in Azure MCP Server May 4, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a repo-committed tools.json snapshot per server so metadata drift becomes reviewable, while extending tools list with --include-hidden and wiring that into contributor automation.

Changes:

  • Added --include-hidden support to tools list option binding and filtering.
  • Added eng/scripts/Update-ToolsList.ps1 and integrated tools metadata regeneration/verification into Analyze-Code.ps1.
  • Added/updated contributor guidance and committed tools.json snapshots for Fabric and Template servers.

Reviewed changes

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

Show a summary per file
File Description
servers/Template.Mcp.Server/tools.json Adds committed tool metadata snapshot for the Template server.
servers/Fabric.Mcp.Server/tools.json Adds committed tool metadata snapshot for the Fabric server.
servers/Azure.Mcp.Server/docs/new-command.md Updates command-authoring guidance to use the new analysis workflow.
eng/scripts/Update-ToolsList.ps1 Adds automation to generate/verify tools.json files from runtime metadata.
eng/scripts/Analyze-Code.ps1 Adds -Fix mode and hooks in tools metadata regeneration/verification.
core/Microsoft.Mcp.Core/src/Areas/Tools/Options/ToolsListOptions.cs Adds the bound option model for including hidden commands.
core/Microsoft.Mcp.Core/src/Areas/Tools/Options/ToolsListOptionDefinitions.cs Defines the new --include-hidden CLI option.
core/Microsoft.Mcp.Core/src/Areas/Tools/Commands/ToolsListCommand.cs Wires the new option into tool-list filtering logic.
CONTRIBUTING.md Updates contributor instructions for the new analysis workflow.

Comment thread eng/scripts/Update-ToolsList.ps1 Outdated
Comment thread eng/scripts/Update-ToolsList.ps1 Outdated
Comment thread CONTRIBUTING.md Outdated
Comment thread servers/Fabric.Mcp.Server/tools.json Outdated
Comment thread servers/Template.Mcp.Server/tools.json Outdated
Comment thread servers/Fabric.Mcp.Server/tools.json Outdated
Comment thread servers/Template.Mcp.Server/tools.json Outdated
Comment thread eng/scripts/Update-ToolsList.ps1 Outdated
hallipr and others added 3 commits May 4, 2026 14:24
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@alzimmermsft
Copy link
Copy Markdown
Contributor

alzimmermsft commented May 4, 2026

The changes adding support for -Fix in Analyze-Code.ps1 look good to me.

The changes to generate the tools.json concern me a bit. Sure, this puts on a blocker on checking in changes where tools were modified without updating a central "source of truth" file, but it feels a bit like work for work's sake and adds more cognitive load to an already complicated development and CI process. It may also distract from taking more of a look on how the tool is being changed and push it more towards a failing CI process.

Additionally, needing to add a shipped runtime feature for CI concerns me. Anything could pass --include-hidden, and it now makes that Attribute conditional and possibly opens up a few branching scenarios in runtime that we need to support.

Copy link
Copy Markdown
Contributor

Copilot AI commented May 4, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 0t3vsblobprodcus362.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • 11vvsblobprodcus336.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • 1k9vsblobprodcus379.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • 1p7vsblobprodcus324.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • 1s1vsblobprodcus386.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • 2kmvsblobprodcus39.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • 2zrvsblobprodcus388.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • 37bvsblobprodcus311.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • 37cvsblobprodcus359.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • 4m6vsblobprodcus384.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • 4vyvsblobprodcus361.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • 4zjvsblobprodcus390.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • 51yvsblobprodcus36.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • 5rqvsblobprodcus385.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • 6s7vsblobprodcus313.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • 7k6vsblobprodcus337.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • 7tjvsblobprodcus341.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • 8xbvsblobprodcus382.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • ajhvsblobprodcus363.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • bcnvsblobprodcus378.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • ckzvsblobprodcus347.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • d0svsblobprodcus381.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • e7bvsblobprodcus348.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • fdpvsblobprodcus345.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • frdvsblobprodcus327.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • gervsblobprodcus329.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • h6tvsblobprodcus346.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • ibzvsblobprodcus369.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • imzvsblobprodcus368.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • josvsblobprodcus372.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • jrqvsblobprodcus343.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • k0ivsblobprodcus356.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • k4kvsblobprodcus344.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • kgfvsblobprodcus314.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • kh4vsblobprodcus325.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • kijvsblobprodcus387.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • kxqvsblobprodcus376.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • lylvsblobprodcus31.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • m16vsblobprodcus374.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • m6xvsblobprodcus342.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • mfjvsblobprodcus373.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • n3kvsblobprodcus335.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • ofvvsblobprodcus315.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • p2ovsblobprodcus312.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • pdfvsblobprodcus380.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • pkvvsblobprodcus321.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • rcxvsblobprodcus328.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • s8mvsblobprodcus38.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • sc4vsblobprodcus331.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • se1vsblobprodcus349.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • sqdvsblobprodcus333.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • st8vsblobprodcus339.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • u3hvsblobprodcus371.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • u6ovsblobprodcus377.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • ukkvsblobprodcus352.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • uy6vsblobprodcus34.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • v53vsblobprodcus320.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • vb4vsblobprodcus33.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • vwvvsblobprodcus334.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • xupvsblobprodcus332.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • yttvsblobprodcus357.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)
  • ytvvsblobprodcus310.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/ (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot finished work on behalf of hallipr May 4, 2026 21:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 11 changed files in this pull request and generated 4 comments.

Comment thread eng/scripts/Update-ToolsList.ps1 Outdated
Comment thread eng/scripts/Update-ToolsList.ps1 Outdated
@hallipr hallipr force-pushed the users/pahallis/tools-json branch from f3af3d4 to a76eb16 Compare May 4, 2026 22:51
@hallipr hallipr changed the title Add tool list export as static file to repo for drift detection Add tool list export to temp file for drift detection May 4, 2026
@@ -1,15 +1,24 @@
#!/bin/env pwsh
Copy link
Copy Markdown
Contributor

@anannya03 anannya03 May 5, 2026

Choose a reason for hiding this comment

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

Just to confirm, skipping the call to New-ToolList.ps1 in Analyze-Code.ps1 was intentional to avoid adding complexity in our Builds?

Use -Verify to check that the committed tools.json files are up-to-date without
overwriting them (exits non-zero on drift).

.PARAMETER Verify
Copy link
Copy Markdown
Contributor

@anannya03 anannya03 May 5, 2026

Choose a reason for hiding this comment

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

The descrption says that we've VERIFY parameter support, but we don't implement it. I think it'd be safe to remove this parameter text,

Copy link
Copy Markdown
Contributor

@jongio jongio left a comment

Choose a reason for hiding this comment

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

Two items that haven't been raised yet:

  1. CONTRIBUTING.md and new-command.md both claim Analyze-Code.ps1 -Fix handles "tools.json drift" and "tools.json regeneration", but the actual Analyze-Code.ps1 changes in this PR don't call New-ToolList.ps1. Either the integration is missing from this PR or the docs should drop the tools.json claim until it's wired in.

  2. New-ToolList.ps1 line 72 uses Write-Warning ... -ForegroundColor Red - Write-Warning doesn't accept -ForegroundColor. This'll throw a ParameterBindingException at runtime when the null/missing-results branch is hit. Swap to Write-Host (consistent with the other error paths in this script) or just drop the color parameter.

The --include-hidden implementation and test coverage look clean. Making searchCommandInCommandGroup static is a nice cleanup.

Comment thread CONTRIBUTING.md
```pwsh
./eng/scripts/Analyze-Code.ps1 -Fix
```

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.

This line claims Analyze-Code.ps1 -Fix runs "tools.json regeneration" but no call to New-ToolList.ps1 was added to the script in this PR. If the integration is planned for a follow-up, this doc update should wait for that commit so contributors don't hit a confusing gap between what the docs promise and what the script does.

$parsed = $jsonString | ConvertFrom-Json

if ($null -eq $parsed -or $null -eq $parsed.results) {
Write-Warning " ❌ Invalid 'tools list' response for $($serverDir.Name)" -ForegroundColor Red
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.

Write-Warning doesn't accept -ForegroundColor. This'll throw a ParameterBindingException when the null/missing results branch executes. Use Write-Host here (consistent with the other error paths) or drop the color arg.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

6 participants