Skip to content

Commit

Permalink
Add note about case-sensitivity
Browse files Browse the repository at this point in the history
  • Loading branch information
sdwheeler committed Oct 18, 2023
1 parent 27cb726 commit 343bd93
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: How to install and use the SecretManagement and SecretStore modules
ms.date: 06/28/2023
ms.date: 10/18/2023
title: Get started with the SecretStore module
---
# Get started with the SecretStore module
Expand Down Expand Up @@ -76,6 +76,20 @@ Name Type VaultName
TestSecret String SecretStore
```

## Notes

When you run `Set-Secret` with the **Name** parameter to specify the name of the secret, the cmdlet
calls `GetSecret()` that's implemented by the vault extension. `Set-Secret` passes through the name
as provided by the user. The vault extension looks up the secret by that name. If `GetGecret()`
returns a match, `Set-Secret` overwrites the secret unless you use the **NoClobber** parameter. The
vault extension always writes the secret information it receives.

It's up to the vault extension implementation to decide whether or not to use a case-sensitive
comparison on the name. For example, secret names in the **Microsoft.PowerShell.SecretStore**
extension vault are case-insensitive. If the name you pass to `Set-Secret` differs only by case with
the name of an existing secret in a SecretStore vault, the name is overwritten with the new value
you provided.

## Related links

- [Register-SecretVault][02]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file: Microsoft.PowerShell.SecretManagement.dll-Help.xml
Module Name: Microsoft.PowerShell.SecretManagement
ms.date: 05/31/2022
ms.date: 10/18/2023
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.secretmanagement/set-secret?view=ps-modules&wt.mc_id=ps-gethelp
schema: 2.0.0
---
Expand Down Expand Up @@ -290,4 +290,16 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## NOTES

When you run `Set-Secret` with the **Name** parameter to specify the name of the secret, the cmdlet
calls `GetSecret()` that's implemented by the vault extension. `Set-Secret` passes through the name
as provided by the user. The vault extension looks up the secret by that name. If `GetGecret()`
returns a match, `Set-Secret` overwrites the secret unless you use the **NoClobber** parameter. The
vault extension always writes the secret information it receives.

It's up to the vault extension implementation to decide whether or not to use a case-sensitive
comparison on the name. For example, secret names in the **Microsoft.PowerShell.SecretStore**
extension vault are case-insensitive. If the name you pass to `Set-Secret` differs only by case with
the name of an existing secret in a SecretStore vault, the name is overwritten with the new value
you provided.

## RELATED LINKS

0 comments on commit 343bd93

Please sign in to comment.