How do I remove anybody from a dist list in Exchange for users without an email address?

26 Views Asked by At

I am trying to migrate users from on prem exchange to the o365 but when running a script, I realized that if the dist list has users which doesn't have an email address, it would not run.

So before running this script, I would like to run a powershell script to remove any users from a dist list which has a blank PrimarySmtpAddress attribute. If it is possible, I would like to create a file which export the names of people whose name were removed. Thanks alot.

Fix an issue with migrating to o365.

0

There are 0 best solutions below