百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

SecretStore

> 编程语言
开源

PowerShell SecretStore 模块 [!IMPORTANT] PowerShell 团队已决定 Microsoft.PowerShell.SecretStore 已实现所有功能,因此 1.0.0 版本中不再包含此模块。

185 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

PowerShell SecretStore 模块 [!IMPORTANT] PowerShell 团队已决定 Microsoft.PowerShell.SecretStore 已实现所有功能,因此 1.0.0 版本中不再包含此模块。

PowerShell SecretStore module

[!IMPORTANT] The PowerShell team has decided that Microsoft.PowerShell.SecretStore is feature complete, so 1.0.6 will be the last feature release.

The nature of secrets has fundamentally changed since this project was designed. Passwordless authentication methods such as passkeys, single sign-on and federated credential systems such as Microsoft Entra ID, biometrics, and hardware security keys are the future — and they aren't something this project can meaningfully support in its current form.

While we will no longer be adding features, we remain committed to addressing security issues in the module. For any security issues, please see our Security Policy.

This extension vault is being retired alongside Microsoft.PowerShell.SecretManagement — see the announcement there for details.

This module is an extension vault for the PowerShell SecretManagement module. It stores secrets locally on file for the current user account context, and uses .NET crypto APIs to encrypt file contents. Secrets remain encrypted in-memory, and are only decrypted when retrieved and passed to the user. This module works over all supported PowerShell platforms on Windows, Linux, and macOS. In the default configuration, a password is required to store and access secrets, and provides the strongest protection.

Secret metadata

Supporting secret metadata is optional for SecretManagement extension vaults. The SecretStore supports secret metadata through the optional Set-Secret vault command Metadata parameter, and the optional Set-SecretInfo vault command.

Configuration

The SecretStore module allows a number of configurations.

It can be configured to require a password to unlock the store, or operate without a password.
The no-password option still encrypts secrets on file and in memory. But the key for decryption is stored on file in the current user location, and is less secure.

SecretStore can also be configured to prompt the user for the password if needed. When a password is provided, it applies only to the current PowerShell session and only for a limited time. The password timeout time is also configurable and set to 15 minutes by default. Password prompting is useful when SecretStore is used interactively. For automation scenarios, password prompting can be disabled and will instead return an error.

If password prompting is disabled and a password is required to access secrets, a Microsoft.PowerShell.SecretStore.PasswordRequiredException will be thrown. In this case, the SecretStore can be unlocked using the Unlock-SecretStore cmdlet.

There is also a SecretStore Scope setting, but it is currently set to CurrentUser and cannot be changed.

The default configuration is set to for best security and interactive use.

powershell
Get-SecretStoreConfiguration

      Scope Authentication PasswordTimeout Interaction
      ----- -------------- --------------- -----------
CurrentUser       Password             900      Prompt

SecretStore cmdlets

The SecretStore exports five cmdlets for manipulating configuration and store state.

Get-SecretStoreConfiguration

This cmdlet displays the current configuration.

Set-SecretStoreConfiguration

This cmdlet sets configuration options for SecretStore. Individual configuration options can be set, or the store can be configured to default settings by using the -Default parameter switch.

powershell
Set-SecretStoreConfiguration -PasswordTimeout 30

      Scope Authentication PasswordTimeout Interaction
      ----- -------------- --------------- -----------
CurrentUser       Password              30      Prompt

Unlock-SecretStore

This cmdlet unlocks the SecretStore with the provided password. The password can be passed in as a SecureString type or in plain text.

Set-SecretStorePassword

This cmdlet changes the SecretStore password. It takes no parameters and can only be used interactively, as it prompts the user for old and new passwords.

Reset-SecretStore

This cmdlet deletes all data in the SecretStore, and updates the configuration. If no configuration parameters are specified, the default settings will be used.
This cmdlet is intended for cases where the password is forgotten, or store files become corrupt and SecretStore is unusable.

Code of Conduct

Please see our Code of Conduct before participating in this project.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C#

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言