Hey guys,
I am a powershell noob in anything but exchange, so just looking for a bit of help on this one.
I have a input file, which lists usernames of the users that I am enquiring about. I need to know all of the groups that the user belongs to AD. Then once that is created, I need to export to a CSV file.
My progress so far -
import-csv "c:\temp\Users.csv"|foreach{Get-QADmemberof $_.Username -includeallproperties|select-object name,type|export-csv "c:\temp\testOutput.csv" -NoTypeInformation -append }
So from here it does most of what it needs to. It grabs the details and throw them into a CSV as I need. But I need it to also have a coloumn on each row advising which user it is querying and if possible a new line between each user that is queried.
Any quick ideas/tips?