Exporting ADGroupMember results to CSV

Hi,

I am currenlty running the following script to get a list of all members within a list of AD Security Groups

$Groups = Get-ADGroup -Filter {name -like "FIL_*"}

Foreach ($Group in $Groups)
{
Write-output $Group.name
Get-ADGroup -Identity $Group | Get-ADGroupmember | format-list name

}

I want to export the results to excel with the Security Group names as the headers and then going down each column would be the members of the group.

Everything i try either leaves the output to excel as a blank worksheet or has non meaning full information in the worksheet.

Could you please help me with this?


July 14th, 2015 11:27pm

use "export-csv -append"
Free Windows Admin Tool Kit Click here and download it now
July 15th, 2015 1:07am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics