finding distribution groups, and group membership via powershell, without exchange server on premise.

After removing our on premise exchange server, we no longer have the ability to edit the "Send on Behalf of" or "Send As" properties of our Active Directory synced distribution lists or mail enabled security groups.
If we create a distribution list, or group in Office 365, we can edit these fields in Office 365.  
Currently, we are looking at deleting our on premise groups/distribution lists, and recreating them in Office 365. (If there is a better way, without using 3rd party tools, please let me know!)

I can use the powershell command "get-adgroup" to find the groups. (I plan on doing distribution lists first, and then mail enabled security groups later, as I have to verify they're not in use for local shares.) and I can use "get-adgroupmember" to find the members of the group.

For ease of creating the new distribution lists in the cloud, it would be nice to have the distribution group name, and email, followed by all members of the group in a file. (Or files.) So that it can be read, while creating the new groups in Office 365.

What is the easiest way to accomplish this?

Thanks for any assistance.
LVL 22
Bartender_1Microsoft Network AdministratorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jian An LimSolutions ArchitectCommented:

there is 2 ways of doing so

you can do delete your onprem and recreate again using this method

OR divorce distribution group via AADconnect

AADconnect will need to reconfigure but i have done this multiple times and it works like a charm.

make sure your password is synced so during that period, user will not notice obvious down time.
the speed of recovery depends on how fast the dirsync STOP completely (it take at least 3 hours above)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Bartender_1Microsoft Network AdministratorAuthor Commented:
I think we're going to delete and recreate the groups on a "as needed" basis. Thanks for sharing these options!

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.