Anthony K O365
asked on
Add bulk users to Distribution Group using Powershell Cmdlet
I need to add about 100 users to a distribution group in my Exchange 2010 organization. The users are in a csv file. What is the power shell command to use to import these users?
Thanks!!
Thanks!!
ASKER
I'm not sure of the columns in my csv file. Would you happen to know the column fields to provide for my csv?
post the header row and i can tell you what to use
ASKER
emailaddress firstname lastname displayname
import-csv c:\users.csv | foreach-object { add-distributiongroupmembe r <group> -member $_.emailaddress }
or
import-csv c:\users.csv | foreach-object { add-distributiongroupmembe r <group> -member $_.displayname }
or
import-csv c:\users.csv | foreach-object { add-distributiongroupmembe
ASKER
Since I'm dealing specifically with Dynamic Distribution Groups, the problem I'm having is the cmdlet is not accepting add-dynamicdistributiongro upMember. Should I not able to substitute this command?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
He was absolutely correct. I need to modify the filter
thanks
thanks
hello,
any chance to import users from file to distribution group from csv using column number, because my csv file doesnt have headers?
any chance to import users from file to distribution group from csv using column number, because my csv file doesnt have headers?
where name is the column header