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

.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

.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

.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

CMMC Compliance — Understanding the Requirements and Why It's Important

CMMC Compliance — Understanding the Requirements and Why It's Important

CMMC compliance is crucial for protecting Controlled Unclassified Information (CUI) in defense contracts. Learn what CMMC is, its certification levels, and why it matters.

Jul 2, 2025
9 min read
CMMC Certification vs. Self-Assessment What You Need to Know

CMMC Certification and Self-Assessment: What Contractors Need to Know

Not all contractors need a third-party CMMC certification. Find out the differences between CMMC certification and self-assessment and which one applies to your organization.

Jul 1, 2025
7 min read
How Much Does It Cost to Achieve CMMC Compliance?

How Much Does It Cost to Achieve CMMC Compliance and Prepare for Certification?

CMMC compliance costs vary by level and organization size. Get a breakdown of certification expenses, hidden costs, and funding options for meeting CMMC requirements.

Jun 30, 2025
7 min read
Azure Migration Planning A Complete Assessment Checklist for a Successful Transition

Azure Migration Planning A Complete Assessment Checklist for a Successful Transition

A successful Azure migration starts with proper planning. Use this step-by-step assessment checklist to evaluate infrastructure, dependencies, and tools before migrating.

Jun 23, 2025
7 min read
Migrate On-Premises VMs to Azure: Tips, Advice & Best Practices

Migrate On-Premises VMs to Azure: Tips, Advice & Best Practices

Learn how to migrate on-premises VMs to Azure with expert tips and best practices. Optimize your cloud migration strategy for security, performance, and cost efficiency.

Jun 20, 2025
9 min read
Azure Migration vs AWS Migration Key Differences

Comparing Azure Migration and AWS Migration Key Differences in Cloud Strategy

Comparing Azure and AWS for cloud migration? Learn the key differences in pricing, security, tools, and performance to choose the right platform for your business.

Jun 18, 2025
8 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

Secure. Defend. Thrive.

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

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

Schedule a Free Consultation