Solved

Exchange 2010 Create External Contacts -Import CSV

Posted on 2014-03-31
4
1,454 Views
Last Modified: 2014-04-03
Ok so I created  CSV with 4 Fields.

ExternalEmailAddress
Name
Firstname
LastName

I entered in eahc users info into theose fields and saved the file ads a CSV to my root of : on exhcnage and called it VertedaExternals.CSV

I ran this cmd

Import-Csv .\VertedaExternal.csv| ForEach {New-MailContact -Name $_.Name -DisplayName $_.Name -ExternalEmailAd
dress $_.ExternalEmailAddress -FirstName $_.FirstName -LastName $_.LastName}

it errros with ALOT of stuff saying it

New-MailContact : Missing an argument for parameter 'ExternalEmailAddress'. Specify a parameter of type 'System.Object'
 and try again.
At line:1 char:111
+ Import-Csv .\VertedaExternal.csv| ForEach {New-MailContact -Name $_.Name -DisplayName $_.Name -ExternalEmailAd <<<<
    + CategoryInfo          : InvalidArgument: (:) [New-MailContact], ParameterBindingException
    + FullyQualifiedErrorId : MissingArgument,New-MailContact

The term 'dress' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spell
ing of the name, or if a path was included, verify that the path is correct and try again.
At line:2 char:6
+ dress <<<<  $_.ExternalEmailAddress -FirstName $_.FirstName -LastName $_.LastName}
    + CategoryInfo          : ObjectNotFound: (dress:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException



Here is an exmaple line of the csv

ExternalEmailAddress      Name      FirstName      LastName
user.last@verteda.com      User, Last      User       last
0
Comment
Question by:Twhite0909
  • 3
4 Comments
 
LVL 35

Expert Comment

by:Joseph Daly
ID: 39967337
This right here makes me think you have a line break or carriage return somwhere in your code.

The term 'dress' is not recognized as the name of a cmdlet, function, script file, or operable program.

Make sure you dont have wordwrap on and make sure that your command is all on one line
0
 
LVL 35

Accepted Solution

by:
Joseph Daly earned 500 total points
ID: 39967338
Your code looks like this which if that is how it is save would be wrong.

Import-Csv .\VertedaExternal.csv| ForEach {New-MailContact -Name $_.Name -DisplayName $_.Name -ExternalEmailAd
dress $_.ExternalEmailAddress -FirstName $_.FirstName -LastName $_.LastName}

Import-Csv .\VertedaExternal.csv| ForEach {New-MailContact -Name $_.Name -DisplayName $_.Name -ExternalEmailAddress $_.ExternalEmailAddress -FirstName $_.FirstName -LastName $_.LastName}

Open in new window

0
 

Author Comment

by:Twhite0909
ID: 39967344
Actually lets make it easier lol

Ive attached a snapshot of what my CSv looks likes.  Using this CSV what cmd do I need to run to create these contacts?

TY
CSVpic.PNG
0
 
LVL 35

Expert Comment

by:Joseph Daly
ID: 39967443
See my comment above. It looks like your code has a break in it. The command should be all on one line.
0

Featured Post

How does your email signature look on mobiles?

Do your employees use mobile devices to reply to emails? With mobile becoming increasingly important to the business world, it is in your best interest to make sure that your email signature looks great across all types of devices.

Join & Write a Comment

Resolve Outlook connectivity issues after moving mailbox to new Exchange 2016 server
Local Continuous Replication is a cost effective and quick way of backing up Exchange server data. The following article describes the steps required to configure Local Continuous Replication. Also, the article tells you how to restore from a backup…
In this video we show how to create a Distribution Group in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >>…
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now