none
create a contact object from csv file exchange 2007 RRS feed

  • Question

  • i have like 100 contact object to import /create in my domain:

    mydomain.com/external-contact/new group

    i have there firstname,surname email address and country

    how can i do this from powershell command ?

    Thanks

    Sunday, July 17, 2011 3:18 AM

Answers

  • Hi,

    Run the cmdlet with OrganizationalUnit

    New-MailContact -Name "Ted Bremer" -FirstName "Ted" -LastName "Bremer"-ExternalEmailAddress ted@tailspintoys.com -OrganizationalUnit 'OU=new group OU=external-contact,DC=mydomain,DC=com'

    > what about if i have to creat a user without email address for now

    No, you can't just create a AD user via EMS.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    • Marked as answer by Jason LJS Tuesday, August 2, 2011 9:05 AM
    Thursday, July 21, 2011 12:39 AM

All replies

  • im creating one by one the contact object in the user and group i got something call external-contact and there another section for some compagny.

     

     

    Sunday, July 17, 2011 1:38 PM
  • Hi,

    What do you mean " i got something call external-contact and there another section for some compagny."?

    To create a new contact via cmdlet, you can do like that:

    New-MailContact -Name "Ted Bremer" -FirstName "Ted" -LastName "Bremer" -ExternalEmailAddress ted@tailspintoys.com

    All the attributes you can set have been listed in the link below:

    http://technet.microsoft.com/en-us/library/bb124519(EXCHG.80).aspx

     


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Tuesday, July 19, 2011 1:38 AM
  • i got my domain

    lets call it mydomain.com

    then an OU call external-contacts and under this i have a compagny name

     

    i want tro create it there

     

    also what about if i have to creat a user without email address for now

     

    Thanks

    Tuesday, July 19, 2011 2:27 AM
  • Here is an example on how you can create them using a script

     

    $data = Import-Csv .\Contacts-orginal.csv
     
        foreach ($row in $data) {
        $Alias = $row.Alias
        $Name = $row.Name
        $EmailAddress = $row.EmailAddress
        $PrimarySmtpAddress = $row.PrimarySmtpAddress
        $Description = $row.Description
        $ExternalSmtpAddress = $row.ExternalSmtpAddress
       
        New-MailContact -Name $Name -Alias $Alias -ExternalEmailAddress $ExternalSmtpAddress -OrganizationalUnit 'OU=Target,DC=target,DC=local'
       
        Set-Contact -Identity $Alias -Notes $Description

    }


    Jonas Andersson | Microsoft Community Contributor Award 2011 | MCITP: EMA 2007/2010 | Blog: http://www.testlabs.se/blog | Follow me on twitter: jonand82
    Tuesday, July 19, 2011 7:07 AM
  • Hi,

    Run the cmdlet with OrganizationalUnit

    New-MailContact -Name "Ted Bremer" -FirstName "Ted" -LastName "Bremer"-ExternalEmailAddress ted@tailspintoys.com -OrganizationalUnit 'OU=new group OU=external-contact,DC=mydomain,DC=com'

    > what about if i have to creat a user without email address for now

    No, you can't just create a AD user via EMS.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    • Marked as answer by Jason LJS Tuesday, August 2, 2011 9:05 AM
    Thursday, July 21, 2011 12:39 AM