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!
2 Answers
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.
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.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically