Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Exchange 2010 Create External Contacts -Import CSV

Posted on 2014-03-31
4
Medium Priority
?
1,647 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Steps to fix error: “Couldn’t mount the database that you specified. Specified database: HU-DB; Error code: An Active Manager operation fail”
There can be many situations demanding the conversion of Outlook OST files to PST format and as such, there is no shortage of automated tools to perform this conversion. However, what makes Stellar OST to PST converter stand above the rest? Let us e…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

783 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