External contact properties

Hello again Scripting Guys!

Today I have pieced together a script to create external contacts. Everything is working find but I have been asked that when I create them to have the box under the E-mail Addresses TAB that states " Automatically update e-mail addresses based on e-mail address policy" not checked. Is there anyway to have this box unchecked when the contact is created?

Rick

June 30th, 2015 5:13pm

Hi Rick,

I think you can use smthg like that :

Get-MailContact -identity "toto" | set-mailcontact -emailaddresspolicyenabled $false

Julien

Free Windows Admin Tool Kit Click here and download it now
June 30th, 2015 5:29pm

If you want to Create a new contact and disable the email address at the same time, you can do so by piping the MailContact object created by New-Mailcontact directly to Set-MailContact

New-MailContact -Name "RiccBabbittTest" -ExternalEmailAddress riccbabbitt@test.com  | Set-MailContact -EmailAddressPolicyEnabled $false


June 30th, 2015 8:46pm

Hi Rick,

I think you can use smthg like that :

Get-MailContact -identity "toto" | set-mailcontact -emailaddresspolicyenabled $false

Julien

  • Marked as answer by Richardlaw 14 hours 31 minutes ago
Free Windows Admin Tool Kit Click here and download it now
June 30th, 2015 9:28pm

Hi Rick,

I think you can use smthg like that :

Get-MailContact -identity "toto" | set-mailcontact -emailaddresspolicyenabled $false

Julien

  • Marked as answer by Richardlaw Wednesday, July 01, 2015 4:37 PM
June 30th, 2015 9:28pm

Hi Rick,

I think you can use smthg like that :

Get-MailContact -identity "toto" | set-mailcontact -emailaddresspolicyenabled $false

Julien

  • Marked as answer by Richardlaw Wednesday, July 01, 2015 4:37 PM
Free Windows Admin Tool Kit Click here and download it now
June 30th, 2015 9:28pm

If you want to Create a new contact and disable the email address at the same time, you can do so by piping the MailContact object created by New-Mailcontact directly to Set-MailContact

New-MailContact -Name "RiccBabbittTest" -ExternalEmailAddress riccbabbitt@test.com  | Set-MailContact -EmailAddressPolicyEnabled $false


  • Marked as answer by Richardlaw 14 hours 31 minutes ago
July 1st, 2015 12:45am

If you want to Create a new contact and disable the email address at the same time, you can do so by piping the MailContact object created by New-Mailcontact directly to Set-MailContact

New-MailContact -Name "RiccBabbittTest" -ExternalEmailAddress riccbabbitt@test.com  | Set-MailContact -EmailAddressPolicyEnabled $false


  • Marked as answer by Richardlaw Wednesday, July 01, 2015 4:37 PM
Free Windows Admin Tool Kit Click here and download it now
July 1st, 2015 12:45am

If you want to Create a new contact and disable the email address at the same time, you can do so by piping the MailContact object created by New-Mailcontact directly to Set-MailContact

New-MailContact -Name "RiccBabbittTest" -ExternalEmailAddress riccbabbitt@test.com  | Set-MailContact -EmailAddressPolicyEnabled $false


  • Marked as answer by Richardlaw Wednesday, July 01, 2015 4:37 PM
July 1st, 2015 12:45am

Thanks guys with only a slight modification it worked like a charm. The modification I had to make was to add a ":" between -emailaddresspolicyenabled and $false so it read like this: -EmailAddressPolicyEnabled:$False

Thanks again.

Rick


Free Windows Admin Tool Kit Click here and download it now
July 1st, 2015 12:41pm

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

Other recent topics Other recent topics