I am not an advanced PowerShell scripter, so hoping some help here..
I am trying to create and add distribution group members from a master excel book. The book has close to 300 sheets each with 1 distribution group info; the sheet name is the distribution group name.
I have parsed the excel book to separate csv sheets in a folder using VB macro, so the folder has 300 csv files with individual DG information on it (columns are email addresses of members in that group)
What i am trying to achieve is a script which will read the contents in that folder and create distribution groups based on the name of the csv sheet and then read each csv sheet and add the members inside the file.
So far, i have found a way to create the distribution groups all 300 and parse the csv sheets. I am stuck at reads the csv files and adding members. So what i have now is,
Get-ChildItem "<Folder name where the csv' s are present>" (this reads all 300 csv sheets), Now i need something like
Add-DistibutionGroupMember -Identity "<this should be the name of the sheet>" -Member "<read the name of the sheet and look for property email and add the members $_.member)
i don't know how to pipe it after reading the child item into ForEach Object.
Any help is much appreciated.