![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Exchange Powershell one-liner to Mail-Enable Contacts Hello - I am trying to use powershell to mail-enabled several hundred AD contacts objects. I am testing on one contact object with the following one-liner: get-contact -identity "domain.com/Users/Test Contact" | foreach { enable-mailcontact -ExternalEmailAddress $_.WindowsEmailAddress } The WindowsEmailAddress attribute has a valid SMTP address but the command fails with the following message: Enable-MailContact : Cannot bind parameter 'ExternalEmailAddress'. Cannot convert "test.contact@xxxxxx" to "Microsoft.Exchange.Data.ProxyAddress". There isn't much information on Microsoft.Exchange.Data.ProxyAddress other than it is looking for a SMTP address which I believe I have supplied it. Anyone here have any ideas on the error or another approach? |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Exchange Powershell one-liner to Mail-Enable Contacts Hi RobDG, Correct me If I'm wrong, if the contact has an WindowsEmailAddress value then isn't it already enabled? --- Shay Levy Windows PowerShell MVP http://blogs.microsoft.co.il/blogs/ScriptFanatic PowerShell Toolbar: http://tinyurl.com/PSToolbar R> Hello - I am trying to use powershell to mail-enabled several hundred R> AD contacts objects. I am testing on one contact object with the R> following one-liner: R> R> get-contact -identity "domain.com/Users/Test Contact" | foreach { R> enable-mailcontact -ExternalEmailAddress $_.WindowsEmailAddress } R> R> The WindowsEmailAddress attribute has a valid SMTP address but the R> command fails with the following message: R> R> Enable-MailContact : Cannot bind parameter 'ExternalEmailAddress'. R> Cannot convert "test.contact@xxxxxx" to R> "Microsoft.Exchange.Data.ProxyAddress". R> R> There isn't much information on Microsoft.Exchange.Data.ProxyAddress R> other than it is looking for a SMTP address which I believe I have R> supplied it. R> R> Anyone here have any ideas on the error or another approach? R> |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Exchange Powershell one-liner to Mail-Enable Contacts Hi Shay - Unfortunately no. There are several Exchange attributes that need to get populated besides the e-mail address. This seems like it should be a very straightforward powershell command sequence.. "Shay Levy [MVP]" wrote: Quote: > Hi RobDG, > > Correct me If I'm wrong, if the contact has an WindowsEmailAddress value > then isn't it already enabled? > > > > --- > Shay Levy > Windows PowerShell MVP > http://blogs.microsoft.co.il/blogs/ScriptFanatic > PowerShell Toolbar: http://tinyurl.com/PSToolbar > > > > R> Hello - I am trying to use powershell to mail-enabled several hundred > R> AD contacts objects. I am testing on one contact object with the > R> following one-liner: > R> > R> get-contact -identity "domain.com/Users/Test Contact" | foreach { > R> enable-mailcontact -ExternalEmailAddress $_.WindowsEmailAddress } > R> > R> The WindowsEmailAddress attribute has a valid SMTP address but the > R> command fails with the following message: > R> > R> Enable-MailContact : Cannot bind parameter 'ExternalEmailAddress'. > R> Cannot convert "test.contact@xxxxxx" to > R> "Microsoft.Exchange.Data.ProxyAddress". > R> > R> There isn't much information on Microsoft.Exchange.Data.ProxyAddress > R> other than it is looking for a SMTP address which I believe I have > R> supplied it. > R> > R> Anyone here have any ideas on the error or another approach? > R> > > > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Exchange Powershell one-liner to Mail-Enable Contacts Hi RobDG, What do you get for: PS > Get-Contact 'Test Contact' | Disable-MailContact Is it similar to this error: PS > Disable-MailContact : "domain.com/Users/Test Contact" is not a mail contact. If so, does this work: Get-Contact 'Test Contact' | foreach { Enable-MailContact $_ -externalEmailAddress $_.windowsEmailAddress.toString() } --- Shay Levy Windows PowerShell MVP http://blogs.microsoft.co.il/blogs/ScriptFanatic PowerShell Toolbar: http://tinyurl.com/PSToolbar R> Hi Shay - Unfortunately no. There are several Exchange attributes R> that need to get populated besides the e-mail address. This seems R> like it should be a very straightforward powershell command R> sequence.. R> R> "Shay Levy [MVP]" wrote: R> Quote: Quote: >> Hi RobDG, >> >> Correct me If I'm wrong, if the contact has an WindowsEmailAddress >> value then isn't it already enabled? >> >> --- >> Shay Levy >> Windows PowerShell MVP >> http://blogs.microsoft.co.il/blogs/ScriptFanatic >> PowerShell Toolbar: http://tinyurl.com/PSToolbar >> R> Hello - I am trying to use powershell to mail-enabled several >> hundred >> R> AD contacts objects. I am testing on one contact object with the >> R> following one-liner: >> R> >> R> get-contact -identity "domain.com/Users/Test Contact" | foreach { >> R> enable-mailcontact -ExternalEmailAddress $_.WindowsEmailAddress } >> R> >> R> The WindowsEmailAddress attribute has a valid SMTP address but the >> R> command fails with the following message: >> R> >> R> Enable-MailContact : Cannot bind parameter 'ExternalEmailAddress'. >> R> Cannot convert "test.contact@xxxxxx" to >> R> "Microsoft.Exchange.Data.ProxyAddress". >> R> >> R> There isn't much information on >> Microsoft.Exchange.Data.ProxyAddress >> R> other than it is looking for a SMTP address which I believe I have >> R> supplied it. >> R> >> R> Anyone here have any ideas on the error or another approach? >> R> |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Exchange Powershell one-liner to Mail-Enable Contacts That is great Shay! I remember playing with the $_ to pass the identity but I didn't know about the .toString() option. Thanks much for the help! "Shay Levy [MVP]" wrote: Quote: > Hi RobDG, > > > What do you get for: > > PS > Get-Contact 'Test Contact' | Disable-MailContact > > Is it similar to this error: > > PS > Disable-MailContact : "domain.com/Users/Test Contact" is not a mail > contact. > > > > If so, does this work: > > Get-Contact 'Test Contact' | foreach { > Enable-MailContact $_ -externalEmailAddress $_.windowsEmailAddress.toString() > } > > > > > > > > --- > Shay Levy > Windows PowerShell MVP > http://blogs.microsoft.co.il/blogs/ScriptFanatic > PowerShell Toolbar: http://tinyurl.com/PSToolbar > > > > R> Hi Shay - Unfortunately no. There are several Exchange attributes > R> that need to get populated besides the e-mail address. This seems > R> like it should be a very straightforward powershell command > R> sequence.. > R> > R> "Shay Levy [MVP]" wrote: > R> Quote: Quote: > >> Hi RobDG, > >> > >> Correct me If I'm wrong, if the contact has an WindowsEmailAddress > >> value then isn't it already enabled? > >> > >> --- > >> Shay Levy > >> Windows PowerShell MVP > >> http://blogs.microsoft.co.il/blogs/ScriptFanatic > >> PowerShell Toolbar: http://tinyurl.com/PSToolbar > >> R> Hello - I am trying to use powershell to mail-enabled several > >> hundred > >> R> AD contacts objects. I am testing on one contact object with the > >> R> following one-liner: > >> R> > >> R> get-contact -identity "domain.com/Users/Test Contact" | foreach { > >> R> enable-mailcontact -ExternalEmailAddress $_.WindowsEmailAddress } > >> R> > >> R> The WindowsEmailAddress attribute has a valid SMTP address but the > >> R> command fails with the following message: > >> R> > >> R> Enable-MailContact : Cannot bind parameter 'ExternalEmailAddress'. > >> R> Cannot convert "test.contact@xxxxxx" to > >> R> "Microsoft.Exchange.Data.ProxyAddress". > >> R> > >> R> There isn't much information on > >> Microsoft.Exchange.Data.ProxyAddress > >> R> other than it is looking for a SMTP address which I believe I have > >> R> supplied it. > >> R> > >> R> Anyone here have any ideas on the error or another approach? > >> R> > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| bulk mail enable contacts for existing AD users | PowerShell | |||
| one-liner PowerShell | PowerShell | |||
| Synch Exchange Server and Vista Mail & Contacts | Vista mail | |||
| Using Exchange Server account for mail, calendar and contacts | Vista mail | |||
| Exchange 2007 "Activate the PowerShell" One liner Contest | PowerShell | |||