You can use Select-Object -ExpandProperty, but because the expanded value is a flat string (as opposed to a custom object with multiple properties), you need a bit more work to turn each value back into a Certificate property:
$array = $array |Select-Object * -ExcludeProperty Certificate -ExpandProperty Certificate |Select-Object @{Name='Certificate';Expression={"$_"}},* -ExcludeProperty Length
This might look a bit counter-intuitive, but the first Select-Object expands the string values from the Certificate property, and then attaches all remaining properties to the resulting values - we now have a list of strings with ETS properties attached to it.
The second Select-Object then creates a new object copying all the attached properties except for String.Length (ie. all the properties we copied from the original object), and re-attaches a Certificate property that contains the value of the string itself.
Let's test it on some dummy data:
$array = @(
[pscustomobject]@{
Certificate = @('cert1', 'cert2', 'cert3')
ExpirationDate = '2022-01-05'
Email = 'user@domain'
Site = 'KY'
}
[pscustomobject]@{
Certificate = @('cert4', 'cert5')
ExpirationDate = '2022-01-10'
Email = 'user@domain'
Site = 'KY'
}
)
$array |Format-Table
$array = $array |Select-Object * -ExcludeProperty Certificate -ExpandProperty Certificate |Select-Object @{Name='Certificate';Expression={"$_"}},* -ExcludeProperty Length
$array |Format-Table
Which shows the desired transformation:
Certificate ExpirationDate Email Site
----------- -------------- ----- ----
{cert1, cert2, cert3} 2022-01-05 user@domain KY
{cert4, cert5} 2022-01-10 user@domain KY
Certificate ExpirationDate Email Site
----------- -------------- ----- ----
cert1 2022-01-05 user@domain KY
cert2 2022-01-05 user@domain KY
cert3 2022-01-05 user@domain KY
cert4 2022-01-10 user@domain KY
cert5 2022-01-10 user@domain KY