Return Secondary SMTP Addresses that prefix with SMTP

I am running the following command which returns a few properties along with all the secondary addresses. The issue I need to resolve is to filter all secondary addresses which do not begin with "smtp". I also do not want to return
the case sensitive version of smtp: "SMTP"
Output Below:
Get-Mailbox UnityVM -DomainController DC05-ResultSize Unlimited | Where {(!($_.RecipientTypeDetails -Match "RoomMailbox|SharedMailbox"))} | Select-Object DisplayName,alias,Identity,ServerName,RecipientTypeDetails,PrimarySmtpAddress, @{Name=“SecondaryAddresses”;Expression={$_.EmailAddresses
-join "`n"}}

This thread appears to be abandoned.  Here is the crux post by the OP.  I reformatted for clarity
Get-Mailbox crusso -DomainController DC01 -ResultSize Unlimited |
Where {(!($_.RecipientTypeDetails -Match "RoomMailbox|SharedMailbox"))} |
Select-Object DisplayName,
alias,
Identity,
ServerName,
RecipientTypeDetails,
PrimarySmtpAddress,
Name="SecondaryAddresses";
Expression={
$mbx.EmailAddresses|Where {$_.ProxyAddressString -cmatch '^smtp:'}
The OP asked a specific and narrow question but has added a convoluted and unstated complexity at the end. I suspect the thread was abandoned when the OP realized the problem.  In reality most of the solutions answer the original question.  The
legerdemain actually alters the question.
Look closely at the whole code snippet and note that the OP has no understanding of PS and has just blindly added the examples into code that was likely copied from yet another forum.
Using PowerShell without the brain disengaged is foolish.  It is like flying an airplane blindfolded.  It can be done but often leads to a crash.
Notice how I was able to adeptly slip in "the word of the day" and yesterday's "word of the day" and now tomorrow's "word of the day".  Pretty good, huh?
Ciao..  a presto!
¯\_(ツ)_/¯

Similar Messages

  • How do I change my iCloud email address that syncs with my iPhone?

    I had to change my e-mail address today.  I changed it in iTunes and checked it on apple.com (Manage ID).  Everything is fine, except now the e-mail address I have associated with iCloud on my iPhone is out-dated. It's the old one. 
    How do I update the e-mail address for iCloud on my iPhone? I can change the password, but not the e-mail address.  Do I really have to delete the account from my iPhone and add a new one? 
    Note, I don't want to change the actual e-mail address that I got when I set up my iCloud account i.e. [name]@me.com.  I want to change the e-mail address that syncs with iCloud and my iPhone. 
    Many thanks

    Go to Settings>iCloud, tap Delete Account, then sign back in with your updated ID.  This only deletes the account and any data you are syncing with iCloud from your device, not from iCloud.  Provided you are signing back into the same account, your data will be synced back to your device when you sign back in.
    Save any photo stream photos to your camera roll before deleting the account (tap Edit, tap the photos, tap Share, tap Save to Camera Roll).

  • How may I change the email address that goes with ...

    Hi, 
    How may I change the email address that goes with my subscription?
    When I set up my original subscription, it was through an former employer.
    When I just bought some Skype credits, the confirmation page indicated that the verification email was to be sent to my old work email address.
    Thank You.

    Sign In to your account at www.skype.com and click on Account Settings
    then change Primary Email Address under Notification Settings
    Regards,
    Neil

  • Address that works with skype

    When I try to call flag comes up and. Say can not open wrong address

    Hi there...
    I have the Jabra BT125 and I have a new Mac Book Pro on it's way. The headset is actually something I already had for my cell phone. And now I'm hoping to use it for skype as well. What I think I lack is the Blue Tooth adapter. I was looking for one that I can power via USB rather than the ones you have to charge. I also have a logitech V320 optical mouse. Do you think the blue tooth adapter can run both the mouse and the headset as not to take up too many USB ports at the same time? (I envision my computer eventually resembling that guy from He11 Raiser! with all the pins sticking out of it) Anyway... Jabra says the BT125 supports Bluetooth version 2. I'm not sure if the mouse is similar or not... (I'm actually really new to all this lingo and I just assume the wireless capability of the mouse is bluetooth... The specs say it's a "microreceiver") Any comments, experiences or suggestions are really appreciated... thanks!!!

  • How to set the Email(i) address that you get with your iPhone 3G in Japan?

    This isn't covered in the U.S. manual probably because the feature is slightly different in Japan.
    Basically the issue is this - cell phones in Japan have their own "cell phone email address". I believe that's not the case in the U.S.
    So when I got my iPhone 3G in Japan today from Softbank, the cell phone provider, I also got a new email address [email protected] The "i" stands for iPhone.
    The question is what to do with it? Unlike other cell phone providers, this is not set up on the cell phone itself when you get it.
    Thanks,
    doug

    I figured it out.
    With the iPhone you can set up multiple regular Internet email accounts directly in the Mail app, using either IMAP or POP3 and even have your existing accounts synched from your computer.
    It turns out that the [email protected] email account you get with your iPhone is just another "Other" account that you set up in the mail settings. When you add your Softbank address and password it automatically sets up the server to be IMAP for checking mail and the correct SMTP server and it just appears as one more push account in your accounts list.
    I'm not sure it is really useful for anything or not, but since a lot of people want to know "what is your cell phone address" I guess it is best to set it and have one rather than explain why you don't really need a separate cell phone address for your iPhone.
    It's sort of interesting. And it is actually an improvement over traditional Japanese cell phone email I think. And you can see nice HTML mail to boot.
    Anyway, I hope this helps anybody else who doesn't know what to do with their extra Softbank address that comes with their iPhone 3G.
    doug

  • Message Tracking logs for secondary smtp address

    Hi,
    There are many people sending mails to secondary smtp address instead of primary smtp address. How can i pull the report of message tracking logs if they sent it to secondary smtp address using get-messagetrackinglog cmdlet?
    Sankar M http://messagingdevelopment.blogspot.in/

    Hi Sankar,
    If I don't understand your description, it seems that you want to get the message tracking log on an mailbox with primary SMTP address and secondary SMTP address.
    If it is the case, please add both primary SMTP address and secondary SMTP address to the "Recipients" parameter. More details to see:
    http://technet.microsoft.com/en-us/library/aa997573(v=exchg.150).aspx
    Thanks
    Mavis Huang
    TechNet Community Support

  • Mail users have spam sent to their secondary SMTP addresses forwarded to their personal e-mail addresses- Exchange 2010

    We currently have a spam issue relating to the secondary SMTP e-mail addresses of all our Mail Users.
    Example: Peter Smith has an AD account on our company.com domain and an associated external e-mail address ([email protected]) i.e. he has an AD account ([email protected]) with Mail User Exchange attributes so that he can logon
    to our SharePoint server. However, this AD account also becomes a fully functional secondary SMTP address and all spam sent to [email protected] also gets forwarded to [email protected]
    To mitigate this issue, I have added this secondary e-mail address to the "Recipient filtering properties > Block messages sent to the following recipients" in Hub Transport/Anti Spam.
    Two questions:
    1. Is there an easy way to delete the secondary SMTP addresses of mail users? I was unable to (it just reappeared shortly after deletion)
    2. What is the PS command to export a list of all secondary SMTP e-mail addresses OF MAIL USERS and then adding this list to "Recipient filtering properties > Block messages sent to the following recipients". I could manually add them
    in EMC but there are quite a few of them...
    Many thanks for your help!

    Now that I understand what's happening, let me see if we can get a more accurate solution for you.  So your mail users (Exchange calls them mail-enabled users, as opposed to mailbox enabled users, who have mailboxes) have SharePoint access (with the
    @company.com address), but have actual mailboxes externally (the actual end-domain is inconsequential).  You want users of these systems to stop receiving emails on the company.com namespace, but to receive them from only your SharePoint system. 
    A "textual diagram" is below:
    SharePoint (to Exchange mailbox owner) ==> Exchange hub (using company.com) ==> Exchange mailbox
    SharePoint (to External mail user) ==> Exchange hub (using company.com) ==> Exchange mail contact ==> External system (using external SMTP address
    External Messaging system (to External mail user, using company.com address used by SharePoint) ==> Exchange hub =XX=> Block delivery
    You wish to stop the third of these from happening.  If your SharePoint system used non-routable addresses (such as company.local) and all of your mail users had only these addresses added to their accounts for internal mail precossing (as the
    internal name used by Exchange), this would solve your issue.  The question becomes how to deploy this sort of address. 
    If these are the ONLY mail contacts in your organization, the solution is simple - you almost had it above, but may have missed seeing it.  Policies are applied on a priority basis, with the default policy applying only if no others apply.  Since
    these accounts are considered "Contacts with external e-mail addresses", you can create a policy for your entire organization that handles only these accounts.  You don't need to apply it to a single OU, if your mail enabled accounts aren't
    in a single OU.  (If they are, of course, feel free to apply it only there.)  You can create the policy and apply it to the organization, but only to those objects that are "Contacts with external e-mail addresses".  That way, it won't
    affect any of your Exchange mailboxes (current or future).
    Does this help?
    (BTW, one minor correction - your third statement about mail contacts is incorrect - Exchange sees no major difference between mail contacts and mail enabled accounts - and in my experience they are both addressable by the internal address.)

  • Will Exchange ever support sending mail from a secondary smtp address?

    Most here probably know this but a quick recap:
    User has PrimarySMTP address of [email protected] and secondary SMTP of
    [email protected] In Outlook, if you set the secondary SMTP address in the "From" field, Exchange will throw an "undeliverable" error stating you're not authorized to send mail as
    this user. I know there's
    3rd party tools that can help you with this, and ways to circumvent this (using extra accounts or distrigroups) but it's actually really annoying. I've been involved with a lot of companies with different brands (and a domain for each brand) and
    who want to communicate with the outside world using these different brandnames. One salesmanager could be involved with different brands and right now you'll have to create a new account or group for each and every brand/domainname.
    With every new Exchange one of the first things I check if this behaviour has changed.. Will this ever be implemented? Is there anyone here that could shed some light on that? Is there a reason why this does not change?
    Kind regards,
    Remco Roxs

    Nobody who participates in these forums knows what the future holds at Microsoft.  If we did, we wouldn't be able to share it with you in any case because we'd be sworn to secrecy.
    Just buy this for your sales manager: http://www.ivasoft.biz/choosefrom2007.shtml
    Or just tell him to use two mailboxes.
    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."

  • Exchange 2010 to 2013 cross forest migration doesn't have an SMTP address that matches the target delivery domain

    I’m having a problem moving a mailbox from exchange 2010 sp3 to Exchange 2013 which are in two separate forests.
    Two way trust in place
    Certificates imported
    ADMT is set up.
    SMTP namespace oldcompany.org and newcompany.org for the old email domain and new one is configured to be shared between forests. 
    I’m doing the following:
    Step 1
    Prepare-MoveRequest.ps1 -Identity [email protected] -RemoteForestDomainController DC1. oldcompany.Local -RemoteForestCredential $RemoteCredentials -LocalForestDomainController DC1. newcompany.local -LocalForestCredential $LocalCredentials  -TargetMailUserOU
    "OU=Office Users , DC=newcompany,DC=local" –verbose
    Everything goes ok, and a disabled user is created. A disabled user account is created in the correct OU.
    Email address is set to [email protected]
    Proxy smtp addresses are set:
    smtp:[email protected]
    SMTP:[email protected]
    smtp:[email protected]
    Step 2
    I then use ADMT and migrate sid history ect.
    Step 3
    New-MoveRequest –Identity [email protected] –Remote –Remotehostname exchange.oldcompany.local  -RemoteCredential $RemoteCredentials –TargetDeliverydomain exchange.newcompany.local
    This then fails with the error:
    The target mail user newcompany.local/Office Users /mark test' doesn't have an SMTP address that matches
    the target delivery domain 'exchange.newcompany.local'.
        + CategoryInfo          : InvalidArgument: ([email protected]:MailboxOrMailUserIdParameter) [New-MoveReques
       t], RecipientTaskException
        + FullyQualifiedErrorId : [Server=EXCHANGE,RequestId=ec704dc8-bfb9-47c1-a1ec-cc6d8ef00484,TimeStamp=23/12/2014 1
       0:51:33] [FailureCategory=Cmdlet-RecipientTaskException] 5ABE3B29,Microsoft.Exchange.Management.RecipientTasks.New
      MoveRequest
        + PSComputerName        : exchange.newcompany.local
    Any ideas what I am missing. 

    Hi Walkersway,
    As you have mentioned both the domains are "shared between forests", I would assume its added to the accepted domains as Internal Relay. Also you have 'Send Connector' Setup to relay out the email to the new forest.
    "You configure the SMTP domain as an internal relay domain to make sure that email that's addressed to that domain is accepted by the Exchange organization. The connector configuration of your organization determines how messages are routed."
    In your case "newcompany.local" should be present.
    Try this:
    New-MoveRequest –Identity [email protected] –Remote –Remotehostname exchange.oldcompany.local -RemoteCredential $RemoteCredentials –TargetDeliverydomain newcompany.local
    The TargetDeliveryDomain parameter specifies the FQDN of the external email address
    created in the source forest for the mail-enabled user when the move request is complete. This parameter is allowed only when performing remote moves with the
    Remote or RemoteLegacy parameter.
    Regards,
    Satyajit
    Please “Vote As Helpful”
    if you find my contribution useful or “Mark As Answer” if it does answer your question. That will encourage me - and others - to take time out to help you.

  • Why is Mail asking me for the name of an smtp server for an email address that doesn't exist?

    I've migrated from Snow Leopard to Mountain Lion on a new Mac, but in trying to use Mail on ML, it keeps asking me for the name of an smtp server for an email address that's never existed. The addy has my user name correct, but the server part of the address doesn't exist, or at least I've never used an email address with that provider. On ML there's no plist file for Mail, so nothing to delete there. What else can I do to get Mail working? The only other option I have is to abandon Mail as being crippled and useless, and use Postbox, which for it's price (US$9.95) is an attractive option. OTOH, I've paid for Mail after all, so it really ought to work. Any clues as to what I can do to stop its nonsensical behaviour? How do I file a bug report?
    TIA.
    Pauline

    Amasis wrote:
    On ML there's no plist file for Mail, so nothing to delete there.
    ~/Library/Containers/com.apple.mail/Container.plist
    (Go to your Finder "Go" menu hold the option key to choose "Library", since the ~/Library is hidden on ML)

  • Easily remove an SMTP address that has been applied by a Email Address Policy?

    Hello,
    How can I remove an SMTP address that has been applied to all users mailboxes and distribution lists?
    Thanks

    Hi,
    You can use "Email Address Policy" to manage all of the user's SMTP address.
    For Exchange 2003:
    How to Modify an SMTP E-Mail Address by Using Recipient Policies
    For Exchange 2007:
    Managing E-Mail Address Policies in Exchange Server 2007
    For Exchange 2010:
    Remove an E-Mail Address Policy
    Hope this helps!
    Thanks.
    Niko Cheng
    TechNet Community Support

  • Secondary SMTP sort?

    Is there a way to sort the order the secondary SMTP servers appear? As far as I can tell the iPhone uses these secondary servers if the primary fails, but in successive order. I'd very much like to rearrange the order of this list.
    Actually, I wish the iPhone was intelligent enough to recognise the corresponding SMTP server to use based on which WiFi or EDGE/3G network I am currently accessing. Too much to ask?

    That will work okay, but you will more than likely want to pull your hair out after the first 5 or 6. The article recommends using 3rd-party products for that volume of users, and I would concur. 
    I would recommend using MigrationWiz in this instance, since they offer full-fidelity migrations (mail, contacts, calendars), as well as options around what to do with Gmail Labels (convert to folders, put a copy in each folder that a message had a corresponding
    label for, etc).  The best part is, that you can use an OAuth key to connect to Gmail, so you don't need to know or grant individual permission to every user's mailbox.
    I would recommend this series of steps:
    Purchase Office 365.
    Purchase 300 MigrationWiz Commercial Licenses.
    Configure both contoso.com and fabrikam.com domains in Office 365.
    Configure OAuth Key for GMail.
    Import CSV to Office 365 to create users with existing contoso.com domain.  Recommend configuring impersonation.
    Run first pass of migration.
    Verify data integrity.
    Apply secondary fabrikam.com addresses for users so they can receive as @contoso.com and @fabrikam.com.
    Cut over MX record and configure Autodiscover record.
    After 2x MX TTL has expired, run a final MigrationWiz delta synchronization.
    Switch user's UserPrincipalNames to @fabrikam.com domain (if you want to go through with the username/primary SMTP switch.

  • Primary - secondary smtp function not working

    The text on my iPhone clearly states that should a primary smtp server not be working then the device will go on and try each of the secondary smtp servers in turn. However, long story short it sticks on the primary. I can see a number of posts on this issue here going back many months, but with no solution.
    Does anyone yet know how to fix this? If not, aside from manually turning off the primary smtp server, what is the the best way to switch between outoing servers, e.g. from home wifi to town 'phone network, or vice versa?

    Right i dont know if this helps or if this is what you are asking but?
    But i dont send many emails when im out and about i always tend to send them when im in the house using my wi-fi, but one day i wanted to send an email whilst i was in work but it would'nt let me. Well to cut it short. My ISP wont let me use their server to send email once im out of the wi-fi range (so to speak) so someone from Macrumors told me to delete all my ISP details from the Outgoing server and then put in my Outgoing server, Primary Server, in the SMTP part.
    Host name: smtp.o2.co.uk
    Username: (this is your actual o2 website log-in name like) [email protected]
    Password: (is you o2 log-in password)
    try that, i hope this helps (or it is what you are talking about lol) mine works a treat now whilst im out of my wi-fi area.
    Message was edited by: draperm25

  • You can use the same email address that you used to set up the old Sync? , before bookmarks can return, if I registered success?

    for my old email address account( @qq.com)
    july 2014 I install new windows xp, but I can't log in before account 44*******@qq.com, its always give me enjoyful when I was easy open bookmark url from different computer.
    but there is no any notice or email to me firefox will have new sync system, if there, I could backup before bookmarks from 28 vision ( or some june's vision), but this big browser group is quiet, now, I can't log in again old account,
    achieve process:
    1st, normal account and right password, its show me unknown account.
    2nd, Password Reset, " An email has been sent to the requested account with further information. If you do not receive an email then please confirm you have entered the same email address used during account registration.", I couldn't receive any mail(or in spam) :(
    3rd, How to update to the new Firefox Sync ...
    "You can use the same email address that you used to set up the old Sync." , before bookmarks can return, if I registered success?
    I really feel disappointment with firefox( although used for many years), much text, but couldn't resolve clear simple path. answers more hidden link to read, I just use it explore internet, I am not technology engineer, don't care what so much b***t.
    thanks, back me old bookmarks only, thanks.

    Hi eddinchina,
    You should have no need to use the Old Sync account.
    As long as device or devices are Firefox 29 or later (They should all be Firefox 30 now) you should use the New Sync.
    You may use the same email address with both accounts.

  • I am unable to send to an address that I have been using for a long time. All aspects have been investigated but with no solution ,has anyone encountered this problem before?

    I am unable to send to an address that I have been using for a long time. All aspects have been investigated but with no solution ,has anyone encountered this problem before?

    Hi Eric,
    The message seems to totally disappear. It is going to an AOL customer in UK. I changed their address to start with a lowercase letter & the message was returned to me by AOL as undeliverable, I then changed the first letter of the address beck to upper case, the same I have been using for years, but again it disappeared.
    I appreciate any help you can give me. Tks Gord.

Maybe you are looking for

  • Design problem

    Hi all, I have a question related to design. suppose there are 3 classes: a, b and c and there is a event defined in class a. however, class b is resposible for that event. so how would you do? pass class b instant to class a?

  • Double click issue on loading.

    Hi guys.  My website has been up and running brillianty, but I have just noticed something.  I have my navigation bar at the top of the page.  To load things, I do var myMovieClip = new contact_mc(); var myMovieClip2 = new aboutUs_mc(); var myMovieCl

  • Ipod not recognized and Restore doesn't work

    i have an ipod classic 160 GB, with disk mode enabled. When i connect it to the mac mini, it calls up iTunes. but then the message comes up that ipod can't be recognized. So i have restored it (using the latest updates, by connecting to the net) and

  • Client cache size reverts to default

    (SCCM 2012 SP1 with CU5) I've used a powershell script to set the client cache size to 20GB, using get-wmiobject and the Put() function.  I've deployed this to a test collection of PCs using a CI with remediation, and it's both checking and remediati

  • Maintenance view: add new entry under existing ones

    Hi, I would like to add a new entry in a maintenance view, but keeping the existing entries visible. That is, I want a new line to appear under the older ones, so I can see them, instead of opening a whole new screen with empty lines. Thanks in advan