troubleshooting Question

Unable to bulk add members to a Distribution Group

Avatar of nav2567
nav2567Flag for United States of America asked on
Microsoft 365Powershell
7 Comments1 Solution2218 ViewsLast Modified:
Hello,

I have a CSV file c:\users.csv which has list of UPN.  The format looks like this:

UPN
user1@mydomain.com
user2@mydomain.com
.....

I am able to use the below command to add members to an Office 365 Group:
Import-CSV "C:\users.csv" | % { Add-UnifiedGroupLinks -Identity "Office 365 testgroup" -LinkType Member -Links $_.UPN  }

However, I am getting an error if I specify a Distribution Group I create in the O365 portal Exchange admin console.
"This operation couldnt be performed because object 'testgroup' couldn't be found on ......outlook.com.....

What is the main different between the two type of groups?  How do I fix the issue?

Thanks.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 7 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros