Solved

Exchange 2010 Create External Contacts -Import CSV

Posted on 2014-03-31
4
1,476 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
Find out what you should include to make the best professional email signature for your organization.
To show how to generate a certificate request 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 Servers >> Certificates…
how to add IIS SMTP to handle application/Scanner relays into office 365.

920 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

12 Experts available now in Live!

Get 1:1 Help Now