From 176c411f718bea5d1da532b54d5b1361164cf5c8 Mon Sep 17 00:00:00 2001 From: Robin Malik <8790561+robinmalik@users.noreply.github.com> Date: Tue, 13 May 2025 13:56:46 +0100 Subject: [PATCH] Update Register-PSResourceRepository.md - Example 4 (#225) * 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. * Update Register-PSResourceRepository.md - Adhere to contrib guide Improve contrib guide adherance * Update Register-PSResourceRepository.md Edit for style --------- Co-authored-by: Sean Wheeler --- .../Register-PSResourceRepository.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/powershell-gallery/powershellget-3.x/Microsoft.PowerShell.PSResourceGet/Register-PSResourceRepository.md b/powershell-gallery/powershellget-3.x/Microsoft.PowerShell.PSResourceGet/Register-PSResourceRepository.md index 7bedd96..161d0b0 100644 --- a/powershell-gallery/powershellget-3.x/Microsoft.PowerShell.PSResourceGet/Register-PSResourceRepository.md +++ b/powershell-gallery/powershellget-3.x/Microsoft.PowerShell.PSResourceGet/Register-PSResourceRepository.md @@ -115,9 +115,16 @@ PSGv3 https://www.powershellgallery.com/api/v3 True 50 ### Example 4 This example registers a repository with credential information to be retrieved from a registered -**SecretManagement** vault. You must have the **Microsoft.PowerShell.SecretManagement** module -installed and have a registered vault containing the stored secret. The format of the secret must -match the requirements of the repository. +**SecretManagement** vault, where **SecretStore** is the name of the vault and **TestSecret** is the +name of the stored secret. + +You must have the **Microsoft.PowerShell.SecretManagement** module installed, have a registered +vault, and stored a secret within it. If setup correctly, the command +`Get-SecretInfo -Name 'TestSecret'` would return the secret. + +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 or token. +In others it may need storing as a **SecureString** representing just the token. ```powershell $parameters = @{