none
PowerShell - add "display as" in contact RRS feed

Answers

  • If you add a field to the CSV DisplayAs and then make the following modification to the line that sets the EmailAddress that should work

                        "Email"
                        {
                            $ExchangeContact.EmailAddresses[[Microsoft.Exchange.WebServices.Data.EmailAddressKey]::($MappingArray[1])] = $ContactItem.$Key;
    						if($MappingArray[1] -eq "EmailAddress1"){
    							$ExchangeContact.EmailAddresses[[Microsoft.Exchange.WebServices.Data.EmailAddressKey]::EmailAddress1].Name = $ContactItem.DisplayAs;
                        	}
    					}
    cheers
    Glen


    • Edited by Glen ScalesMVP Thursday, September 3, 2015 3:32 AM
    • Marked as answer by Bartoch Thursday, September 3, 2015 8:09 AM
    Wednesday, September 2, 2015 11:59 PM

All replies

  • If you add a field to the CSV DisplayAs and then make the following modification to the line that sets the EmailAddress that should work

                        "Email"
                        {
                            $ExchangeContact.EmailAddresses[[Microsoft.Exchange.WebServices.Data.EmailAddressKey]::($MappingArray[1])] = $ContactItem.$Key;
    						if($MappingArray[1] -eq "EmailAddress1"){
    							$ExchangeContact.EmailAddresses[[Microsoft.Exchange.WebServices.Data.EmailAddressKey]::EmailAddress1].Name = $ContactItem.DisplayAs;
                        	}
    					}
    cheers
    Glen


    • Edited by Glen ScalesMVP Thursday, September 3, 2015 3:32 AM
    • Marked as answer by Bartoch Thursday, September 3, 2015 8:09 AM
    Wednesday, September 2, 2015 11:59 PM
  • THX A  LOT !

    It's working perfectly !

    Thursday, September 3, 2015 8:09 AM