Quantcast
Channel: Spiceworks Community
Viewing all articles
Browse latest Browse all 6732

Bulk importing Mail Contacts into AD

$
0
0

I am trying to import 70 mail contacts that I have been given in an excel document for a distribution list. so here is what I did:

1. Created a new distribution group in EMC
2. converted the xls into a csv doc
3. added a display name column since there was only a first & last name column.
4 used the following PS command from my exchange 2007 EMS:


Powershell
Import-Csv"suppliers.csv"|ForEach{New-MailContact-Name$_.Name-Firstname$_.FirstName-LastName$_.LastName-company$_.company-EmailAddress$_.EmailAddress-OrganizationalUnit"my.domain.com/Users"}
But when I ran it I received this error message:


Powershell
New-MailContact:Aparametercannotbefoundthatmatchesparametername'company'.Atline:1char:123+Import-Csv"suppliers.csv"|ForEach{New-MailContact-Name$_.Name-Firstname$_.FirstName-LastName$_.LastName-Company<<<<...<<<<

Viewing all articles
Browse latest Browse all 6732


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>