I'm using the Quest AD cmdlets, particularly Get-QADUser, to pull a list of users from AD and return just a few attributes. No problems, easy enough, but I want to transform one of the properties (parentContainerDN) before exporting to CSV.
Get-QADUser -name "Froosh" | Select-Object logonName,homeDrive,parentContainerDN | Export-CSV C:\Temp\File.csv
This works of course, but the parentContainerDN is long and untidy. Is there an easy way to replace that with parentContainerDN.Name before passing that to Export-CSV?
I'd be happy with a commandline solution, or a script snippet.
Thanks!