Skip to content

WhatIf support for commands #3894

@Gijsreyn

Description

@Gijsreyn

Prerequisites

  • Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
  • Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Document new Get-Foo cmdlet" instead of "New cmdlet."

Summary

As a user, I want to see what the impact of some of the commands is going to be. This helps to provide messages even before the command is actually executed. With the rise of dsc.exe, this allows implementing the -WhatIf operation.

Scenario: Install a language

Take for example the Install-Language command. Even though you could use $allLangues = [System.Globalization.CultureInfo]::GetCultures("AllCultures") to list out all languages and pass it to Install-Language, what if a user appends the -WhatIf switch. It can provide information early on stating:

  • The language was not found
  • Attempting to install the language
  • Language already exist

Details

No response

Proposed Content Type

Cmdlet Reference

Proposed Title

No response

Related Articles

https://github.com/MicrosoftDocs/windows-powershell-docs/blob/main/docset/winserver2019-ps/languagepackmanagement/Install-Language.md

P.S. I recognize this might not be the right repository.

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue-doc-ideaIssue - request for new contentneeds-triageWaiting - Needs triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy