Quantcast
Channel: Exchange Server 2013 - General Discussion forum
Viewing all articles
Browse latest Browse all 4521

Get-mailbox where e-mail does not containt spesific domain

$
0
0

Hi all,

Wondering if anyone could help me with the following:

Would like to get all mailboxes that does not have *@domain.com as e-mail (default or alias) and export it to csv file.

Get-Mailbox -ResultSize Unlimited | Where-Object {($_.SMTPAddress -notcontains "*@domain.com*")} |export-csv C:\Scripts\mailboxes.csv

Tried the above but did not work.

Thanks!


Please mark as helpful if you find my contribution useful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you. Thank you! Off2work



Viewing all articles
Browse latest Browse all 4521

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>