I am exporting data from AD, sAMAccount names to be exact, using Quest CMDlets.
I use Get-QADUser | Select SamAccountName | Export-CSV C:\file.csv
Everything works fine but in the output I get two rows at the top that I do not want.
The first is the type information which is easy enough by tacking -NoTypeInformation to the Export-CSV command
However, I also get SamAccountName as the first line when -NoTypeInformation is used. Is there a way to remove that line? Or conversely exclude it when using Get-Content to read the CSV in?
Thanks!