How to Import a Contact List into Another User's Outlook?
Asked by
gcode+arc9
I have a local contact list in Outlook that I've exported to a CSV or PST file. I'm looking to use PowerShell to import this contact list into another user's Outlook account. Is this something I can do, and if so, how? Thanks in advance!
Answers
If you're working with Exchange or Exchange Online, you can definitely export your contacts folder to a PST file. After that, you just need to import that PST file into the other user's mailbox on the Exchange side. It's pretty straightforward once you've got the PST ready.
Reply to this answer
Yes, it's totally doable! You can use PowerShell to import contacts from a CSV file into Outlook. Here's a quick script you might find handy:
```powershell
$Outlook = New-Object -ComObject Outlook.Application
$Namespace = $Outlook.GetNamespace("MAPI")
$Contacts = $Namespace.GetDefaultFolder([Microsoft.Office.Interop.Outlook.OlDefaultFolders]::olFolderContacts)
$csv = Import-Csv "C:PathContacts.csv"
foreach ($c in $csv) {
$contact = $Contacts.Items.Add("IPM.Contact")
$contact.FirstName = $c.FirstName
$contact.LastName = $c.LastName
$contact.Email1Address = $c.Email
$contact.BusinessTelephoneNumber = $c.BusinessPhone
$contact.MobileTelephoneNumber = $c.MobilePhone
$contact.Save()
}
```
Just make sure to run this script logged in as the user whose Outlook you're importing into, preferably with Outlook closed.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions