Skip to content

Commit 786fee8

Browse files
authored
Update Register-PSResourceRepository.md - Example 4
Provide a little more information around example 4. From my reading here it wasn't clear anywhere that the secret must be stored as a PSCredential object and expected Find-PSResource to use the name of the secret and the value of the secret as username/password. This wasn't the case.
1 parent 3367f26 commit 786fee8

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

powershell-gallery/powershellget-3.x/Microsoft.PowerShell.PSResourceGet/Register-PSResourceRepository.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,10 @@ PSGv3 https://www.powershellgallery.com/api/v3 True 50
115115
### Example 4
116116

117117
This example registers a repository with credential information to be retrieved from a registered
118-
**SecretManagement** vault. You must have the **Microsoft.PowerShell.SecretManagement** module
119-
installed and have a registered vault containing the stored secret. The format of the secret must
120-
match the requirements of the repository.
118+
**SecretManagement** vault, where `SecretStore` is the name of the vault and `TestSecret` is the name of the stored secret.
119+
You must have the **Microsoft.PowerShell.SecretManagement** module installed, have a registered vault, and stored a secret within it.
120+
If setup correctly, the command `Get-SecretInfo -Name 'TestSecret'` would return the secret.
121+
Note: The format of the secret must match the requirements of the repository. In some instances, `TestSecret` might need storing as a PSCredential object with a username and password/token. In others it may need storing as a SecureString representing just the token.
121122

122123
```powershell
123124
$parameters = @{

0 commit comments

Comments
 (0)