Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // Find all certificates expected to expire within next 7 days
- //
- cluster("https://dsms.kusto.windows.net/")
- .database("dsms")
- .GetAKVCertificateInformation
- | where ServiceName contains "cpim"
- | where SecretType == "Certificate"
- | extend Expiration = todatetime(NotAfter)
- | extend CertName = split(Secret, "/")[-1]
- | where datetime_diff("day", Expiration, now()) <= 7
RAW Paste Data
Copied