• How to remove Email Address with .net suffix

    Abhey Member

    How to remove Email Address with .net suffix. Via AD PowerShell, Exchange Management Shell or Quest Shell.

  • Adan Member

    An AD property or an actual Exchange email address domain? (Where the domain is *.net)

    If it’s the 2nd one, why would you need a CSV? you can simply spool through your entire list of users and use this PS script.

    foreach($i in Get-Mailbox -ResultSize Unlimited) {
      $i.EmailAddresses |
        ?{$_.AddressString -like '*@yourdomain.net'} | %{
          Set-Mailbox $i -EmailAddresses @{remove=$_}
        }
    }
    

    This will remove entries that has *@yourdomain.net from all mailboxes while leaving all other email addresses intact, perfect for situations where a certain OU had two domain suffixes and one was decommissioned.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.