Import-ContactList

Exchange Online

Applies to: Exchange Online

Topic Last Modified: 2012-07-11

This cmdlet is available only in the cloud-based service.

Use the Import-ContactList cmdlet and a .csv file to import a user's mail contacts to a cloud-based mailbox. Users can use an email client to export their contacts to a .csv file that is formatted for Microsoft Office Outlook.

For information about the parameter sets in the Syntax section below, see Syntax.

The Import-ContactList cmdlet submits a request to import a list of mail contacts that are contained in a .csv file to a cloud-based mailbox. Many MAPI and Web-based email clients allow users to export contacts to a Microsoft Office Outlook .csv format. Users can then provide that .csv file to you to import contacts to their cloud-based mailbox. During the import process, Microsoft Exchange matches the column names in the header row of the .csv file to the property names of an Exchange contact.

You need to be assigned permissions before you can run this cmdlet. Although all parameters for this cmdlet are listed in this topic, you may not have access to some parameters if they're not included in the permissions assigned to you. To see what permissions you need, see the "Recipient provisioning permissions" section in the Recipients Permissions topic.

The CSV parameter simply specifies that the contacts will be imported from a .csv file.

CSVData

Required

System.Byte[]

The CSVData parameter specifies the .csv file you want to import. Use the following syntax for this parameter: ([System.IO.File]::ReadAllBytes("<file name and path>")). For example, ([System.IO.File]::ReadAllBytes("C:\My Documents\Contacts.csv")).

CSVStream

Required

System.IO.Stream

This parameter is reserved for internal Microsoft use.

Identity

Required

Microsoft.Exchange.Configuration.Tasks.MailboxIdParameter

The Identity parameter specifies the target mailbox to which the contacts are imported. You can use any value that uniquely identifies the mailbox.

For example:

Alias

Distinguished name (DN)

GUID

Name

Display name

LegacyExchangeDN

Email address

Confirm

Optional

System.Management.Automation.SwitchParameter

The Confirm switch causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You don't have to specify a value with the Confirm switch.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

This parameter is reserved for internal Microsoft use.

WhatIf

Optional

System.Management.Automation.SwitchParameter

The WhatIf switch instructs the command to simulate the actions that it would take on the object. By using the WhatIf switch, you can view what changes would occur without having to apply any of those changes. You don't have to specify a value with the WhatIf switch.