You can specify calculated properties for each of the properties of DomainValidationOptions that you want to drill down into.
Step 1) Discover Properties
Pipe DomainValidationOptions to Get-Member -MemberType Property
to see what properties you're going to be working with:
Get-ACMCertificateList |
Get-ACMCertificateDetail |
Select -ExpandProperty RenewalSummary |
Select -ExpandProperty DomainValidationOptions |
Get-Member -MemberType Property
TypeName: Amazon.CertificateManager.Model.DomainValidation
Name MemberType Definition
---- ---------- ----------
DomainName Property string DomainName {get;set;}
ValidationDomain Property string ValidationDomain {get;set;}
ValidationEmails Property System.Collections.Generic.List[string] ValidationEmails {get;set;}
ValidationStatus Property Amazon.CertificateManager.DomainStatus ValidationStatus {get;set;}
Step 2) Make Request
For the sake of example, lets say that we only want to retrieve DomainName and ValidationDomain. We would add two calculated properties for each of these properties, and then just do a regular select for RenewalStatus on the RenewalSummary object:
Get-ACMCertificateList |
Get-ACMCertificateDetail |
Select -ExpandProperty RenewalSummary |
Where-object {$_.RenewalStatus -ne "Success"} |
Select @{N='DomainName';E={$_.DomainValidationOptions.DomainName}}, `
@{N='ValidationDomain';E={$_.DomainValidationOptions.ValidationDomain}}, `
RenewalStatus
Example Output:
DomainName ValidationDomain RenewalStatus
---------- ---------------- -------------
*.subdomain.mydomain.com mydomain.com PENDING_AUTO_RENEWAL
mything.mydomain.com mydomain.com PENDING_AUTO_RENEWAL
You can perform a similar operation for ValidationEmails, I didn't include it in this example because that would have made too many properties to format cleanly on Stack Overflow. If you wanted to unroll the collection and convert it into a string, its calculated property would look something like this:
@{N='ValidationEmails';E={$_.DomainValidationOptions.ValidationEmails -join ','}}
Further Reading