I'm trying to take the output from get-cscertificate | select-object "alternativenames" which is:
AlternativeNames
----------------
{sip.domain.nl, lyncdiscoverInternal.domain.nl, lyncdiscover.domain.nl, sr-xxxxx.vitens.lan...}
When piping this to ConvertTo-Html the output in the Html file becomes:
System.Collections.Generic.List`1[System.String]
The command i use is: Get-CsCertificate | fl 'AlternativeNames', Issuer, NotAfter, SerialNumber, Subject, Thumbprint, Use |
ConvertTo-HTML -head $a -Body "<H2>$Servername Certificate Information $Date</H2>" |
Out-File C:\Install\LyncCertificateCheck.htm
I know it's because of the {} braces but i can't figure out how to remove or edit or change the formatting.
Anyone?