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
importing-contacts-via-powershell-to-your-office-365-address-book

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”,”Amy.Smith@AgileIT.com” “Lynn McCade”,”Lynn.McCade@AgileIT.com

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

Risks of not using a CMMC RPO

The Risks of Not Using a CMMC RPO for Compliance and Certification Readiness

A CMMC RPO helps organizations prepare for certification and avoid compliance failures. Learn why working with an RPO is essential for achieving CMMC compliance.

Mar 20, 2025
8 min read
CMMC 2.0 Require GCC High for Compliance

Does CMMC 2.0 Require GCC High for Compliance?

Does CMMC 2.0 require GCC High? Learn the cloud options for compliance, data security, and protecting CUI under NIST 800-171 and DFARS.

Mar 17, 2025
10 min read
Office 365 License Comparison: Business Plans Vs. E5, E3 and E1

CMMC RPO vs a C3PAO: Understanding Their Roles in Compliance

Understanding the difference between an RPO and a C3PAO is crucial for CMMC compliance. Learn why they should be separate and how an RPO helps prepare for certification.

Mar 15, 2025
6 min read
Can You Meet CMMC with Google Workspace?

Can You Meet CMMC with Google Workspace?

Is Google Workspace CMMC compliant? Learn about its DFARS, NIST 800-171, and ITAR limitations and how migrating to GCC High ensures full compliance.

Mar 4, 2025
7 min read
Is Maintaining a GCC High Tenant Worth It for Non-Government

Evaluating the Need for a GCC High Tenant in Non-Government Organizations

Explore whether maintaining a GCC High tenant is necessary for organizations not involved in government work. Understand the pros and cons, costs, and compliance considerations.

Feb 25, 2025
7 min read
Top 10 Reasons to Partner with an MSP for Security and Compliance

Top 10 Reasons to Partner with an MSP for Security and Compliance

Discover why partnering with an MSP for security and compliance is critical for organizations navigating FAR CUI and CMMC requirements.

Feb 21, 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