Metadata Search Secrets #404
-
I am having trouble trying to determine how to query secrets with metadata. I have secrets which have a metadata section and field boolean checkbox. I need to use powershell to extract the secrets which have this value = true but am having troubles finding where to get the stored value from. Is there any cmdlet that like Get-Secret | %{ Get-MetadataFieldValue -fieldname x -itemId $_.id = true ...} sort of thing? I was able to write a report that produced this result but was hoping to use just powershell as other operations are required on the results anyways. her is the SQL I used in the GUI:
Any ideas? I guess they best way to ask is How can i see the data value in the metadata using powershell. the docs just are not getting me there and I need an example to start from. thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
solved did this: Find-TssSecret -TssSession $session | %{ Search-TssMetadata -TssSession $session -ItemId $_.SecretId -ItemType Secret } |
Beta Was this translation helpful? Give feedback.
-
That will do it, you are querying the full list of secrets first. If
possible filter anything you can before doing the second search to limit
resource usage
…On Fri, Aug 30, 2024, 4:07 PM dionrowney ***@***.***> wrote:
solved
did this:
Find-TssSecret -TssSession $session | %{ Search-TssMetadata -TssSession
$session -ItemId $_.SecretId -ItemType Secret }
—
Reply to this email directly, view it on GitHub
<#404 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA4OVV3CY5UPI2W7ZVCW3LZUDGG7AVCNFSM6AAAAABNKXREHGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTANJQGM2TAMI>
.
You are receiving this because you are subscribed to this thread.Message
ID: <thycotic-ps/thycotic.
***@***.***>
|
Beta Was this translation helpful? Give feedback.
solved
did this:
Find-TssSecret -TssSession $session | %{ Search-TssMetadata -TssSession $session -ItemId $_.SecretId -ItemType Secret }