Skip to content

Commit e125b8a

Browse files
Fixes #233 - Add missing docs for Unlock-SecretVault (#234)
* Add missing docs for Unlock-SecretVault * Update reference/ps-modules/Microsoft.PowerShell.SecretManagement/Unlock-SecretVault.md Co-authored-by: Mikey Lombardi (He/Him) <[email protected]> * Apply suggestions from code review Co-authored-by: Mikey Lombardi (He/Him) <[email protected]> --------- Co-authored-by: Mikey Lombardi (He/Him) <[email protected]>
1 parent 821ec35 commit e125b8a

File tree

2 files changed

+116
-10
lines changed

2 files changed

+116
-10
lines changed

reference/ps-modules/Microsoft.PowerShell.SecretManagement/Microsoft.PowerShell.SecretManagement.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
Module Name: Microsoft.PowerShell.SecretManagement
33
Module Guid: a5c858f6-4a8e-41f1-b1ee-0ff8f6ad69d3
4-
ms.date: 05/31/2022
4+
ms.date: 08/26/2024
55
Download Help Link: https://aka.ms/ps-modules-help
66
Help Version: 0.1.0.0
77
Locale: en-US
@@ -17,15 +17,6 @@ PowerShell module that has been registered to SecretManagement, and exports five
1717
required by SecretManagement. An extension vault can store secrets locally or remotely. Extension
1818
vaults are registered to the current logged in user context, and are available only to that user.
1919

20-
> [!NOTE]
21-
> This module is supported under traditional Microsoft support agreements, including
22-
> [paid support](https://support.microsoft.com/hub/4343728/support-for-business),
23-
> [Microsoft Enterprise Agreements](https://www.microsoft.com/licensing/licensing-programs/enterprise?rtc=1&activetab=enterprise-tab%3aprimaryr2),
24-
> and [Microsoft Software Assurance](https://www.microsoft.com/licensing/licensing-programs/software-assurance-default.aspx).
25-
> You can also pay for [support](https://support.microsoft.com/contactus) for PowerShell by filing a
26-
> support request for your problem. Please file issues in the source repository using the
27-
> **This product** button in the Feedback section at the bottom of the page.
28-
2920
## Microsoft.PowerShell.SecretManagement Cmdlets
3021

3122
### [Get-Secret](Get-Secret.md)
@@ -55,5 +46,8 @@ Sets the provided vault name as the default vault for the current user.
5546
### [Test-SecretVault](Test-SecretVault.md)
5647
Runs an extension vault self test.
5748

49+
### [Unlock-SecretVault](Unlock-SecretVault.md)
50+
Unlocks an extension vault so that it can be access in the current session.
51+
5852
### [Unregister-SecretVault](Unregister-SecretVault.md)
5953
Un-registers an extension vault from SecretManagement for the current user.
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
---
2+
external help file: Microsoft.PowerShell.SecretManagement.dll-Help.xml
3+
Module Name: Microsoft.PowerShell.SecretManagement
4+
ms.date: 08/26/2024
5+
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.secretmanagement/unlock-secretvault?view=ps-modules&wt.mc_id=ps-gethelp
6+
schema: 2.0.0
7+
---
8+
9+
# Unlock-SecretVault
10+
11+
## SYNOPSIS
12+
Unlocks an extension vault so that it can be accessed in the current session.
13+
14+
## SYNTAX
15+
16+
```
17+
Unlock-SecretVault [-Name] <String> [-Password] <SecureString> [<CommonParameters>]
18+
```
19+
20+
## DESCRIPTION
21+
22+
This cmdlet unlocks an extension vault using the provided **Password**. This allows a vault that
23+
requires password authentication to operate without first having to prompt the user. Not all
24+
extension vaults require password authentication. The cmdlet returns a warning if the extension
25+
vault doesn't support unlocking via password.
26+
27+
## EXAMPLES
28+
29+
### Example 1
30+
31+
```powershell
32+
Unlock-SecretVault -Name SecretStore -Password $SecurePassword
33+
Get-SecretInfo -Vault SecretStore
34+
```
35+
36+
```Output
37+
Name Type VaultName
38+
---- ---- ---------
39+
Secret1 SecureString SecretStore
40+
Secret2 SecureString SecretStore
41+
```
42+
43+
This example uses the command to unlock the `SecretStore` vault. It then runs the `Get-SecretInfo`
44+
command on the vault without being prompted for the vault password.
45+
46+
### Example 2
47+
48+
```powershell
49+
Unlock-SecretVault -Name CredMan -Password $SecurePassword
50+
```
51+
52+
```Output
53+
WARNING: Cannot unlock extension vault 'CredMan': The vault does not support the Unlock-SecretVault
54+
function.
55+
```
56+
57+
This example uses the command to unlock the `CredMan` vault. But the vault doesn't support unlocking
58+
so the command has no effect. A warning is displayed informing that `CredMan` vault doesn't support
59+
unlocking.
60+
61+
## PARAMETERS
62+
63+
### -Name
64+
65+
Name of the vault to unlock.
66+
67+
```yaml
68+
Type: System.String
69+
Parameter Sets: (All)
70+
Aliases:
71+
72+
Required: True
73+
Position: 0
74+
Default value: None
75+
Accept pipeline input: False
76+
Accept wildcard characters: False
77+
```
78+
79+
### -Password
80+
81+
Password used to unlock the vault.
82+
83+
```yaml
84+
Type: System.Security.SecureString
85+
Parameter Sets: (All)
86+
Aliases:
87+
88+
Required: True
89+
Position: 1
90+
Default value: None
91+
Accept pipeline input: False
92+
Accept wildcard characters: False
93+
```
94+
95+
### CommonParameters
96+
97+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
98+
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
99+
-WarningAction, and -WarningVariable. For more information, see
100+
[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
101+
102+
## INPUTS
103+
104+
### None
105+
106+
## OUTPUTS
107+
108+
### System.Object
109+
110+
## NOTES
111+
112+
## RELATED LINKS

0 commit comments

Comments
 (0)