locked
Remove Seconday SMTP Address from Mail contact using powershell RRS feed

  • Question

  • Hi All

    I have 1000 Mail enabled contacts in which i have to remove the secondary SMTP address and Disable the Emailaddress policy option. I need to perform this task using powershell script. Any help in much appreciated

    Thanks

    Rafi


    Rafi
    Tuesday, June 28, 2011 5:16 PM

Answers

  • Hi Rich Matheisen

     

    Thanks for your  help- I did the below and it helped and saved my time.

    1.Import-CSV c:/abc/Contact.csv | ForEach-Object{set-mailcontact -Identity $_."alias"  -EmailAddressPolicyEnabled:$false}

    2. Using Admodify.net removed the secondary SMTP address for the OU.

     

    Thanks a lot for you help.


    Rafi
    Wednesday, June 29, 2011 6:03 AM

All replies

  • On Tue, 28 Jun 2011 17:16:16 +0000, Amd_Rafi wrote:
     
    >I have 1000 Mail enabled contacts in which i have to remove the secondary SMTP address and Disable the Emailaddress policy option. I need to perform this task using powershell script. Any help in much appreciated
     
    I'd use set-mailcontact with the -EmailAddressPolicyEnabled:$false
    parameter first. If you can, add somthing distinctive to a custom
    attributre at the same time.
     
    To remove the secondary proxy addresses, I'd use admodify.net and use
    a custom LDAP query that keyed on the value you loaded into the custom
    attribute.
     
    How you'll know which 1000 contacts to modify I'll leave up to you.
     
    ---
    Rich Matheisen
    MCSE+I, Exchange MVP
     

    --- Rich Matheisen MCSE+I, Exchange MVP
    Wednesday, June 29, 2011 1:31 AM
  • Hi Rich Matheisen

     

    Thanks for your  help- I did the below and it helped and saved my time.

    1.Import-CSV c:/abc/Contact.csv | ForEach-Object{set-mailcontact -Identity $_."alias"  -EmailAddressPolicyEnabled:$false}

    2. Using Admodify.net removed the secondary SMTP address for the OU.

     

    Thanks a lot for you help.


    Rafi
    Wednesday, June 29, 2011 6:03 AM
  • Hi,

    I would mark the answer and close this thread if your problem has been solved.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Thursday, June 30, 2011 3:17 AM