Delete SMTP address
Hello, Because of AcceptedDomain and rules, my users got loads of SMTP email addresses. below is an example of what users have as SMTP addresses: company.fr company-SA.com company.intra group-company.com Magic.com company.com comon.com comp.fr comp-any.com group-company2.com com.com company.es company3.com up-group.com up.intra I would like to know if it is possible to delete the *@company.es, *.up.intra etc... base on a list a specific users (get-content I guess) and leave the bold ones?? Thanks, Graig
March 31st, 2010 8:59am

Try this: $exclude = "company.intra","group-company.com","company.com","comon.com" gc userlist.txt |%{$addrs = (get-mailbox $_).emailaddresses |? {$exclude -notcontains $_.smtpaddress.split("@")[1]}set-mailbox $_ -emailaddresses $addrs}
Free Windows Admin Tool Kit Click here and download it now
March 31st, 2010 3:44pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics