Back

Import Contacts to Office 365 via PowerShell

So first I had to get what fields I could import from Exchange and you can do that by logging into your Exchange Organization via PowerShell and then ...

2 min read
Published on Aug 25, 2011
Import Contacts to Office 365 via PowerShell

So first I had to get what fields I could import from Exchange and you can do that by logging into your Exchange Organization via PowerShell and then typing in the cmdlet “Get-Contact | FL” this will give you a list out of all the available fields that go with a contact. Now you can even go further and type in “Get-Contact | Export-CSV c:filename.csv” and it will spit it all out for to a .csv file which you can use as a template. Beware that this does also make fields that contain Office 365 specific data so you can’t use all of those fields so you’ll have to find out which ones you can’t use. _

Ready to discuss your IT needs? Please check us out for your Managed Service or Cloud Consulting needs._

1). Prepare CSV file, this file should contain all attributes you want to use for your external contact, here is the file I used.

“Name”,”ExternalEmailAddress” “Amy Smith”,”[email protected]” “Lynn McCade”,”[email protected]”

2). Create external contact using following cmdlet:

Import-Csv d:Contacts.csv|%{New-MailContact -Name $\_.Name -ExternalEmailAddress}

Great you’ve just imported your contacts now it’s time to populate the information. You can do that by creating another .csv file with the fields you got from that Get-Contact | export-csv command earlier.

1.) Make sure your CSV file is filled out properly “Name”,”MobilePhone”,”StreetAddress”,”WorkPhone” “Amy Smith”,”6198675309”,”1204 Mission Blvd.,San Diego, CA,90129”,”6198675309” “Lynn McCade”,”8588675309”,”1204 Mission Blvd.,San Diego, CA,90129”,”85886753099”

2). Set the external contact with proper attributes.

Import-Csv d:Contacts.csv|%{Set-Contact -Identity $\_.Name -MobilePhone $\_.MobilePhone -StreetAddress $\_.StreetAddress –WorkPhone $\_.WorkPhone}

Congratulations!! You’ve now imported your contacts into your GAL.

Please check us out for your Managed Service or Cloud Consulting needs.

This post has matured and its content may no longer be relevant beyond historical reference. To see the most current information on a given topic, click on the associated category or tag.

Related Posts

FedRAMP & Microsoft Cloud Tenant Migrations

Understanding FedRAMP Implications for Microsoft Cloud Tenant Migrations

Learn how FedRAMP requirements impact Microsoft cloud tenant migrations and what regulated organizations must do to stay compliant.

Nov 25, 2025
6 min read
Cloud Backup Strategies for Ransomware Protection

Protecting Against Ransomware with Cloud Backup Strategies

Explore effective cloud backup strategies to defend against ransomware attacks. Learn best practices for recovery, redundancy, and data resilience.

Nov 20, 2025
6 min read
Implement Azure Backup Encryption for Data Security

Implementing Encryption for Azure Backup Data

Learn how to implement encryption in Azure Backup to protect your cloud data. Discover key methods, tools, and best practices to ensure data confidentiality and compliance.

Nov 19, 2025
6 min read
Best Practices for Migrating Email to GCC High

Best Practices for Migrating Email to GCC High

Discover the best practices for migrating email to GCC High. Ensure security, compliance, and business continuity throughout your transition.

Nov 18, 2025
9 min read
Ensure Microsoft 365 Backup Data Integrity

Ensuring Data Integrity During Backups in Microsoft 365

Discover strategies to maintain data integrity during Microsoft 365 backups. Prevent corruption, ensure reliability, and meet compliance standards.

Nov 7, 2025
5 min read
Microsoft 365 Tenant Migration for ITAR Organizations

Microsoft 365 Tenant Migration for ITAR-Regulated Organizations

Ensure compliance with ITAR during Microsoft 365 tenant migrations. Learn how to protect export-controlled data and choose the right cloud environment.

Nov 7, 2025
7 min read

Ready to Secure and Defend Your Data
So Your Business Can Thrive?

Fill out the form to see how we can protect your data and help your business grow.

Loading...
Secure. Defend. Thrive.

Let's start a conversation

Discover more about Agile IT's range of services by reaching out.

Don’t want to wait for us to get back to you?

Schedule a Free Consultation

Location

Agile IT Headquarters
4660 La Jolla Village Drive #100
San Diego, CA 92122