Solved

Exchange 2010 Create External Contacts -Import CSV

Posted on 2014-03-31
4
1,569 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
In-place Upgrading Dirsync to Azure AD Connect
In this video we show how to create an Address List 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 Organization >> Ad…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…
Suggested Courses

630 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