Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove-IISConfigCollectionElement -Confirm Parameter Documentation Does Not Match Behavior #3898

Open
3 tasks done
git-johnson opened this issue Nov 7, 2024 · 0 comments
Open
3 tasks done
Labels
issue-doc-bug Something is out of date, unclear, confusing, or broken in the article. Blocks customer success. needs-triage Waiting - Needs triage

Comments

@git-johnson
Copy link

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, "Typo in Get-Foo cmdlet" instead of "Typo."
  • Verify Version: If there is a mismatch between documentation and the behavior on your system, ensure that the version you are using is the same as the documentation. Check this box if they match or the issue you are reporting is not version specific.

Links

Summary

The behavior of the Remove-IISConfigCollectionElement's -Confirm parameter does not match the documentation.
The documentation can be interpreted as: in absence of the -Confirm parameter, the Cmdlet will execute without interactive confirmation being required.

In my usage of the Cmdlet, I was required to pass -Confirm:$false to bypass interactive confirmation. This does not match the documentation.

Default value: False

Details

Examples

This snippet calls the Cmdlet without the -Confirm parameter being passed

Remove-IISConfigCollectionElement -ConfigCollection $IISConfigCollection -ConfigAttribute @{ 'name' = $CustomHeader.Name }

Result in interactive mode
Screenshot 2024-11-07 at 2 56 35 PM

Result in non-interactive mode

Remove-IISConfigCollectionElement : Windows PowerShell is in NonInteractive mode. Read and Prompt functionality is not available.

This snippet calls the Cmdlet with the -Confirm parameter being explicitly set to the documentation's default value ("$false")

Remove-IISConfigCollectionElement -ConfigCollection $IISConfigCollection -ConfigAttribute @{ 'name' = $CustomHeader.Name } -Confirm:$false

Result in interactive and non-interactive mode
No errors, and the Cmdlet is successfully executed without a prompt and behaves as expected.

Suggested Fix

Change the default value in the -Confirm parameter's Default value to True or raise an issue with the PowerShell team if the Cmdlet is not behaving per specifications.

@git-johnson git-johnson added issue-doc-bug Something is out of date, unclear, confusing, or broken in the article. Blocks customer success. needs-triage Waiting - Needs triage labels Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue-doc-bug Something is out of date, unclear, confusing, or broken in the article. Blocks customer success. needs-triage Waiting - Needs triage
Projects
None yet
Development

No branches or pull requests

1 participant