Monday, January 22, 2018

Microsoft.ActiveDirectory.Management.ADPropertyValueCollection | multivalued attributes


:|

$why=get-aduser * -prop servicePrincipalName

$why| where servicePrincipalName|select name,servicePrincipalName |ConvertTo-Csv

gives you
"myadmin","Microsoft.ActiveDirectory.Management.ADPropertyValueCollection"

 $why| where servicePrincipalName|select name, @{L='servicePrincipalName'; E={$_.servicePrincipalName}} |ConvertTo-Csv