Export Group to csv
#Script to export members of a AD-Group, ad a line for every group.
Get-ADGroupMember -identity "%AD-GroupName%" | select name | Export-csv -path "%Path%\%NameOfFile%.csv" -Notypeinformation
Get-ADGroupMember -identity "%AD-GroupName2%" | select name | Export-csv -path "C:\...\%NameOfFile2%.csv" -Notypeinformation