title: How can I import contacts into a mailbox and overwrite with powershell?
body: <p>so I am new to powershell. I understand some of the basics and am still trying to teach myself as much as I can.</p>
  
  <p>So I have been asked to automatically push our company's contacts to everyone's mailbox (around 60-70 contacts to 60-70 mailboxes) We use Office 365.
  They also want the contacts to sync to mobile phones, so I cannot used a shared contact list. It seems only the MAIN contact list can sync to a phone.</p>
  
  <p>So far I have used this:</p>
  
  <pre><code>import-contactlist -csv -csvdata ([system.io.file]::readallbytes("PATH TO CSV FILE")) -identity USER
  </code></pre>
  
  <p>This works just fine, but if there are any changes to the CSV and I run it again, it just doubles all the contacts instead of overwriting. Is there anyway I can overwrite the contacts?</p>
  
  <p>I have also tried this:</p>
  
  <pre><code>Search-Mailbox -identity USER -SearchQuery kind:contacts -deletecontent
  </code></pre>
  
  <p>This does delete the contacts I have created in the first place, but if there are any OTHER contacts that users have created, it would delete those as well.
  I feel like im headed in the right direction.. can anyone help?</p>