Powershell To Locate, Create, Delete, and Edit Exchange Contacts

Hello,
I have been tasked with creating about 160 Exchange contacts. I'm finding that some of the email address listed are secondary email addresses for other users. I am in need of assistance for the following.
- Determine which contacts in my list have already been created.
- Determine which addresses on my list are already in Exchange as secondary SMTP addresses for different contacts/mailboxes.
- For the addresses that are not in Exchange I will need to mass create them.
- For the existing contacts that have addresses in my list, I will need to delete the secondary SMTP that matches ones in my list and create a new contact for the SMTP.
Really not sure how to work this one. Any assistance would be appreciated.
Thanks in advance,

Hi Green-Tech,
Please refer to this script to start, which can delete secondary SMTP addresses based on the string pattern "*@domain.local":
Get-MailContact -OrganizationalUnit "domain.local/OU" -Filter {EmailAddresses -like "*@domain.local"} -ResultSize unlimited -IgnoreDefaultScope | foreach {
$contact = $_
$email = $contact.emailaddresses
$email | foreach {
if ($_.smtpaddress -like "*@domain.local") {
$address = $_.smtpaddress
write-host "Removing address $address from Contact $contact.name
Set-Mailcontact -Identity $contact.identity -EmailAddresses @{Remove=$address}
$contact | set-mailcontact -emailaddresspolicyenabled $false} }}
Refer to:
Powershell script to delete secondary SMTP addresses of Exchange 2010 Mail Contacts
I also recommend you can post your current script and specific issue for a better response.
If there is anything else regarding this issue, please feel free to post back.
Best Regards,
Anna Wang
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

Similar Messages

  • Can't create, delete or edit users in /LDAPv3/127.0.0.1 via WGM

    Hi guys,
    I have followed Mike Bombiches guide to 'Leveraging AD on Mac OSX.' All was fine yesterday...
    But today I cannot create, delete or edit users in the OD Directory. The New User/Group etc.. icons are greyed out... And yes I am authenticated...
    Any ideas?

    Check the logs.
    Also use dscl for authenticated reading and writing. Its error reporting might be easier to corelate. See man dscl.
    HTH
    -Ralph

  • How to delete and edit particular line in a file and save it in same file ?

    Hi,
    I want to delete and edit text at particular line in a file.
    But edit and delete should reflect in same file.
    I have done googling for this but it results with using another file, that i dont want as i need to save changes in same file.
    How can i do this?
    Thanks in advance
    Edited by: vj_victor on May 24, 2010 3:33 PM

    I just want to make sure, this is the only way to do what i mentioned ? or it could be done another way !a) write the data to a new file
    b) delete the old file
    c) write the data to a newer file
    d) delete the new file
    e) rename the newer file to the old file name.
    For a hint about still more ways to do this, search for the complete lyrics of One man went to mow, Went to mow a meadow...
    db

  • Looking for an app that I can create,search and edit documents on all 3 devices iPhone MacBook and ipad

    Looking for an app that I can create,search and edit documents on all 3 devices iPhone MacBook and ipad

    Apples iworks would do that

  • Succession Planning 3.0 - Job Competencies - Hide Delete and Edit button

    Hi,
    In the detail panel of Job, there is a tab for Competencies.
    How do I hide the Delete and Edit button for each of the competency that is in the listing?
    I tried the file enable_actions.xsl and change the value to False.
    <xsl:variable name="enable_edit_competency">false</xsl:variable>
    <xsl:variable name="enable_delete_competency">false</xsl:variable>
    This remove the Delete and Edit button in the Job details, but it also remove the buttons in employee details.
    I want to keep the button in Employee Details.
    Thanks
    Jack
    Edited by: jackwong on Jul 28, 2011 8:16 AM

    Hi Luke!
    Thanks for the tips!
    I copied sap_competencies_xsl.xsl to zzsap_competencies_xsl.xsl
    Then i changed the value
    "$enable_delete_competency = 'na'"
    Then, in sap_job_to_competencies.xsl
    <xsl:include href="nakisa://Titan_Templates_SRS/ZZSAP_COMPETENCIES_XSL.xsl"/>
    It works after a restart!
    Thanks
    Jack

  • On my iphone how do I delete from my exchange contacts, so I only have all my contacts under ALL CONTACTS on the device.

    On my iphone how do I delete from my exchange contacts that were imported from a different email address, this way I only have all my contacts under ALL CONTACTS on the device.

    Contacts imported from a different email address? Are you referring to a different address book, possibly from your computer? Exchange contacts are not stored on your computer. If you turn off Exchange contacts they will disappear from the phone. The phone will always show contacts that are stored on your phone, and keep them separate from the Exchange contacts like they are now. If you delete the ones on the phone and then turn off or lose access to the Exchange account, you will no longer have any contacts.

  • I have an all contacts list and an exchange contact list how do i sync them into 1 list(my exchange list)

    I have an all contacts list and an exchange contact list how do i sync them into 1 list(my exchange list. I want to only use my exchange list but i don't know how to put the other contacts from all contacts or contacts into my exchange list??

    Can any user with similar problem or IPhone developers give a remedial suggestion please?

  • If i delete and edited will it delete the original too ?

    Hello
    If i delete an edit of a picture - i can only delete that as original not showing- will it also delete the original?
    or i have to revert first back to original and then delete?
    but then will be the edited deleted from hard-drive?
    many thx

    1. How to zoom in a picture while editing without the mouse - like keyboard shortcut
    Tap the 1 and 2 keys to zoom in the Viewer window.
    In *Edit Mode* 1 and 2 zoom further in and 0 reverts to viewer size.
    2. Any way to rename the picture file name from Iphoto , if not what u recommend for that?
    No there is no way to rename the file in iPhoto - and no need to. If you rename the file you will change the “address” of the file on the HD and iPhoto will lose it. Instead in iPhoto give the pic a Title. This title is available for search wherever iPhoto is available - including every Open... dialogue in the OS. If, for some reason you need to have a version of the file renamed then export from iPhoto using the File -> Export command. There is an option in that dialogue to use the title as filename.
    Regards
    TD

  • Deleting or Editing Existing Contact Groups

    I am still learning my way around the Droid 2's OS.
    A. I have been trying to figure out how to delete or edit groups that I created under Contacts.
    B. Home button. Sliding one panel to the right you can create shortcuts for frequently used contacts. I was able to define one of them and end up dragging the other two to the trash. How do you add additional ones?

    For
    A. Open my contacts>menu>display groups
    B. Long press on any home screen >select motorola widgets> contact
    It will guide you through who you add.

  • How to view and edit local contacts

    Hi there,
    I recently got my Z10 and I cannot find how to view and edit a local contacts on my phone. I've imported all my contacts from a SIM card, but only SIM card's contacts are displayed when I choose All Contacts.
    I would like to have view of the local contacts, becasue local contacts don't have limitations regarding amount of characters in the contact name which I want to edit.
    Can anyone help with this ?
    Michael

    qualxarnu wrote:
    Hi there,
    I recently got my Z10 and I cannot find how to view and edit a local contacts on my phone. I've imported all my contacts from a SIM card, but only SIM card's contacts are displayed when I choose All Contacts.
    I would like to have view of the local contacts, becasue local contacts don't have limitations regarding amount of characters in the contact name which I want to edit.
    Can anyone help with this ?
    Michael
    in your contacts settings, turn OFF all contact accounts (SIM, BBM ETC) then afterwards you should be able to just see your local contacts.
    Want to contract me? You can follow me on Twitter @RobGambino
    Be sure to click Like! for those who have helped you.
    Click Accept as Solution for posts that have solved your issue(s)!

  • Delegate access to users to create and edit mail contacts in exchange server 2013

    Hi,
    Can I delegate access to users to create/edit/delete contacts in Exchange 2013, if yes, how?

    Hi,
    From your description, you want to grant users the permission to manage mail contacts. If I have misunderstood your concern, please let me know.
    Based on my knowledge, you need to add these users to Organization Management Role group and Recipient Management Role group.
    For more information, here is a thread for your reference, please see the "Recipient Provisioning Permissions" section.
    Recipients Permissions
    http://technet.microsoft.com/en-us/library/dd638132(v=exchg.150).aspx
    Hope it helps.
    Best regards,
    If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Amy Wang
    TechNet Community Support

  • How can I create prefilled and editable PDF's on a Linux server with PHP?

    I can create PDF's with editable form fields (extended features?) and serve those to our users and I can pre-fill form fields with data from the database using FDF, but then the PDF throws an error and the end user can't fill out the remaining fields (in Reader, it still works in Pro).
    I've tried 2 open source approaches already, but the end result is either a fillable form or a pre-filled form. I can't seem to do both at the same time.
    I've looked around adobe.com and frankly there's just so much stuff there that isn't even applicable it's staggering. I am completely lost and resorting to asking a question on a forum. I've searched these forms (and others), but anything related to this problem have no answers. I'm sure there's a way to do it.
    If I try to set the PDF to fetch the FDF using a http post/submit (can I get it to do that when it loads?) I would still have to get an id number into the query string or object on a per document basis (some how?) and that means editing the PDF server side which breaks the structure which then throws the error on the client side and I'm right back at the beginning again.
    At this point, it looks like it's going to take less time to simply create the form in HTML with a unique CSS file for the print version using a PNG for visual elements instead of a PDF. Not a great way to go for printing, but it would only take a day to set up. The time to create new forms is the issue. I don't want to spend 8 hours creating new HTML forms when I can do a PDF in 2 hours. Is it more efficient to go with an Adobe solution or roll my own HTML version?
    All I want to do is help the users save some time by pre-filing part of the form so they can print it.
    Any advice?

    Ok, I hope someone can move this to the Adobe Reader for Android forum, where you will find the experts you need.

  • How to remove the delete and edit toolbar buttons from the Overview page

    Hi,
    In the account/contact overview page, we see that the interaction history assignment block does not support the EDIT and DELETE options.
    However, when we click on the hyperlink description of an activity in the interaction history, we get into the overview page of the activity. Here we can see the DELETE button and the EDIT button.
    Is there a way to remove these two options from the overview page of an activity which is in COMPLETED status and in the interaction history section?
    Please advice.
    Thanks & Best Regards,
    Ramesh.
    PS: We use CRM 5.2 Web UI.

    You can hide the box that shows the snippets and the "Restore Previous Session" box with code in userContent.css
    *http://kb.mozillazine.org/userContent.css
    *http://kb.mozillazine.org/Editing_configuration
    You can use the ChromEdit Plus or Stylish extension to have easier access to the customization files.
    *ChromEdit Plus: http://webdesigns.ms11.net/chromeditp.html
    <pre><nowiki>@-moz-document url(about:home){
    /* hide snippet container on the about:home page */
    #snippetContainer { display: none !important; }
    /* hide sessionRestore container on the about:home page */
    #sessionRestoreContainer { display: none !important; }
    </nowiki></pre>

  • MRP stoage location -  create reservation and external demand

    Hi
    Our company using  MRP for sloc - ROP - type VB
    plant 1000 with
    sloc 1 (Distribution Center)
    sloc 2 (branch) - planning at storage location
    sloc 3 (branch)  -planning at storage location
    currently if I run MRP, a reservation is created from sloc 2 & 3 to plant 1000
    and sloc1 will tranfer the stocks to sloc 2 & 3
    Question 1: Can a reservation be created together with a PR at plant 1000 as the product need to be purchase from external vendor whenever a MRP is executed?
    currently I manipulating the ROP at Plant level to take into requirement for sloc 2 & 3
    Please advice

    A,
    I am not sure I understand the question.  Are you saying that you want to create a purchase req to move stock from 'plant general' to Sloc 2 or 3? Or, do you wish to generate a PurReq from a 3rd party vendor into plant level stock?   or what?
    It sounds like you are currently using replenishment via "stock transfer from storage location to storage location in a plant' for your sloc 2 & 3.  There are other methods.
    If you are using VB against the material/plant, the only time you will generate a purreq is when plant stock (Sloc 123) falls below plant ROP.  VB doesn't care if/when you shuffle stock amongst the various storage locations.
    Read the online help, which outlines all of your options.
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/f4/7d2d3344af11d182b40000e829fbfe/frameset.htm
    Best Regards,
    DB49

  • MediaBox: Create/Delete Vs Edit Media Source?

    I probably wont get a reply to this as I dont think I've ever gotten any reply on the forums but hey I can keep trying.
    I have a basic test application that needs to alternate between four/five videos depending on which thumbnail you click. SImilar to MediaBrowser.
    I'm using the 1.2 MediaBox example to display the video, and transitioning them in.
    it doesn't work that well really because it seems to hang a lot (randomly) when clicking a video. You'll click 2/3 three and its great, then sometimes it will just hang for ages before the next one is played.
    However, it has brought my attention to the way I alternate the videos, it has left me wondering what is the 'proper' way to do it? Do I create a new video each time, deleting the old (which Ive noticed seems to bug sometimes where the sound keeps playing but the video has gone?) from the scene, or do I just reset the mediasource field that controls what video is being played?
    Does anyone know or have any experience with it? Any replies would be appreciated

    Thanks very much for that reply. I did think that but wasn't sure really.
    My first reply... pops open champagne.
    I was using F4V's for two of the videos, not a good idea it doesn't run on lots of machines but typical that it would run on my test machines. I wonder if it could be affecting even the ones that seem to work.

Maybe you are looking for

  • Extnded withholding tax

    sir, when i have tried to view the posting of withholding tax entry for advance/down payment made to vender it shows an error of " WHTax amount exceeds the bank line items amounts" and it is not posting the tax amount to concerned account, pls advise

  • Exporting Cross Tabs to Excel - Data Only

    I have a report with three cross tabs embedded in three report footers (RFa, RFb, RFc).  The third cross tab in RFc, is actually in a subreport.  When I preview the report and then export to excel in Excel Data Only there is no problem.  Howeever, wh

  • Multiscreen HTM5 SharePoint publishing - Facing issues on Windows XP server

    Hi, We are facing lot of unknown error during the SharePoint publishing. These errors are not reported in Windows 7 machines. Are there any OS dependancy for this publishing? Publishing Cancelled : Unknown error Publishing is interrupted with error b

  • RoboHelp HTML 9  - Browse Sequences missing in compiled chm

    After compilation of chm help file, I can see my browse sequences, but the users do not, although  I am working on a 32 bit station, the users on 64 bit. Note: I registered the HHActiveX.dll file as you explained in an older discussion.

  • Error message when trying to upgrade to 9.0

    every time i try to upgrade to the new version for windows vista it always says "invalid drive:F" can someone please tell me what that means?