Skip to content

Reset-SecretStore doesn't respect-Confirm:$false #97

@iamshital

Description

@iamshital

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues.

Steps to reproduce

Install-Module -Name Microsoft.PowerShell.SecretStore -Repository PSGallery -Force -Verbose
$password = ConvertTo-SecureString "1234567890" -AsPlainText -Force
Set-SecretStoreConfiguration -Scope CurrentUser -Authentication Password -PasswordTimeout 172800 -Interaction None -Password $password -Confirm:$false

This sets the secret store configuration.
Now I want to reset it.

Reset-SecretStore -Scope CurrentUser -Authentication None -Confirm:$false

This gives me prompt to confirm my action, even if I mentioned -Confirm:$false

Expected behavior

Reset-SecretStore should complete without user prompt when -Confirm:$false is mentioned.

Actual behavior

Reset-SecretStore -Scope CurrentUser -Authentication None -Confirm:$false
WARNING: !!This operation completely removes all SecretStore module secrets and resets configuration settings to new values!!

Reset SecretStore
Are you sure you want to erase all secrets in SecretStore and reset configuration settings to default?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): A

Error details

No response

Environment data

PS>$PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.19041.1682
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.1682
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Version

1.0.0

Visuals

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions