Share via

Implement a condition on a query

2022-07-01T17:25:33.687+00:00

i have this query wich bring me the expiring dates of the keyvault's secret, I have to bring the dates that are less than 30 days

EXPIRES=$(az keyvault secret show \  
--vault name "$keyvault" \  
--name "$secret" \  
--query "attributes.expires" - o tsv)  

How can I implement something like

--query "attributes.expires < 30 days" - o tsv  
Windows for business | Windows Server | User experience | PowerShell
0 comments No comments

1 answer

Sort by: Most helpful
  1. Rich Matheisen 48,116 Reputation points
    2022-07-01T21:27:40.2+00:00

    You might want to start your search for an answer here: jmespath.org

    What you're asking about has little to do with PowerShell.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.