Skip to content

Complete resource delete plumbing#1407

Merged
SteveL-MSFT merged 9 commits intoPowerShell:mainfrom
tgauth:complete-resource-delete-plumbing
Mar 12, 2026
Merged

Complete resource delete plumbing#1407
SteveL-MSFT merged 9 commits intoPowerShell:mainfrom
tgauth:complete-resource-delete-plumbing

Conversation

@tgauth
Copy link
Collaborator

@tgauth tgauth commented Feb 26, 2026

PR Summary

  • add --what-if and --output-format args to dsc resource delete command

Copy link
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

Adds --what-if support to the dsc resource delete CLI flow, wiring the flag from argument parsing through subcommand dispatch into the resource invocation layer, and validating behavior with a new PowerShell test.

Changes:

  • Add --what-if (and -w) to dsc resource delete and plumb it through to resource.delete(..., ExecutionKind::WhatIf).
  • Add delete-command output formatting support and emit structured output for delete what-if results.
  • Add a Pester test asserting dsc resource delete --what-if returns delete what-if metadata.

Reviewed changes

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

File Description
dsc/tests/dsc_whatif.tests.ps1 Adds a Pester test validating dsc resource delete --what-if output contains delete what-if messages.
dsc/src/args.rs Extends resource delete CLI args with --what-if and --output-format.
dsc/src/subcommand.rs Plumbs new delete args into the resource_command::delete call.
dsc/src/resource_command.rs Implements what-if execution kind for delete and prints structured output for what-if results.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tgauth tgauth requested a review from SteveL-MSFT February 26, 2026 18:45
@SteveL-MSFT SteveL-MSFT added this to the 3.2-Consider milestone Mar 9, 2026
Co-authored-by: Steve Lee <slee@microsoft.com>
@SteveL-MSFT
Copy link
Member

@tgauth can you fix the merge conflict?

@SteveL-MSFT SteveL-MSFT added this pull request to the merge queue Mar 12, 2026
Merged via the queue into PowerShell:main with commit 99201b7 Mar 12, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants