Closed sba923 closed 2 years ago
The secret and secret information look up is performed by the registered extension vault. Which extension vault are you using? Are you able to retrieve the secret with 'Get-Secret' by passing in the name directly? Do you have an example of a name and code page where Get-Secret cannot retrieve the secret?
Oops... should've thought about this. I'm using KeePass.
The whole point is that I can't retrieve the secret using Get-Secret
:
PS❯ get-secretinfo | ? { $_.Name -match 'ulti' } | select name, type
Name Type
---- ----
Windows 7 Ultimate PSCredential
PS❯ get-secret -name 'Windows 7 Ultimate'
Get-Secret: The secret Windows 7 Ultimate was not found.
There are no non-ASCII characters in that name, so I don't think it can be an encoding-related issue.
Please create an issue for the KeePass extension vault (https://github.com/JustinGrote/SecretManagement.KeePass). I am thinking it may be having difficulties dealing with white spaces in names. I tried the above repro with SecretStore, but do not see the problem.
Will do. Note that some of the affected secrets don't have spaces in their names.
Thanks! I'll close this issue.
You're welcome.
When I process the list of secrets returned by
Get-SecretInfo
, I hit a few cases whereGet-Secret -Name <thename>
fails:I'm running PowerShell 7.1.4 on Windows 10.0.18363.1734 with Microsoft.PowerShell.SecretManagement version 1.1.0.