From 786fee8e0c14c6e0c762c6c9b8d5160c6b4fd2e8 Mon Sep 17 00:00:00 2001 From: Robin Malik <8790561+robinmalik@users.noreply.github.com> Date: Tue, 13 May 2025 12:33:09 +0100 Subject: [PATCH 1/3] 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. --- .../Register-PSResourceRepository.md | 7 ++++--- 1 file changed, 4 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..5820704 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,10 @@ 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. +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. ```powershell $parameters = @{ From 51c961863eae7a990ff10635bf03c7488e386eae Mon Sep 17 00:00:00 2001 From: Robin Malik <8790561+robinmalik@users.noreply.github.com> Date: Tue, 13 May 2025 12:43:36 +0100 Subject: [PATCH 2/3] Update Register-PSResourceRepository.md - Adhere to contrib guide Improve contrib guide adherance --- .../Register-PSResourceRepository.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 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 5820704..013f47e 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,10 +115,12 @@ 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, where `SecretStore` is the name of the vault and `TestSecret` is the name of the stored secret. +**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. -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. + +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. ```powershell $parameters = @{ From 46393f9d5321f547808fc2a998119ce357b498e5 Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Tue, 13 May 2025 07:54:54 -0500 Subject: [PATCH 3/3] Update Register-PSResourceRepository.md Edit for style --- .../Register-PSResourceRepository.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 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 013f47e..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,12 +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, where **SecretStore** is the name of the vault and **TestSecret** is the name of the stored secret. +**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. +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. -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. +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 = @{