Real-Time UC

A Universal Communications Blog by Office Apps and Services MVP Michael LaMontagne

Lync Office365 Projects Scripts Skype for Business


A few months ago my SIP address was changing and was looking for a way of exporting/importing my contact list. I wanted a solution to work no matter if the Lync/Skype for Business environment was on-premises, hosted or online.

This led me down the path of playing with the Lync 2013 Client SDK:

If looking at pure on-premises and you have server access, look at the Export-CSUserData cmdlet in PowerShell ( But even then, I would say just grab Anthony Caragol’s Lync Contact Backup and Restore Tool (GUI):

A few months later, I had a client that was migrating between two hosted Skype for Business environments so I combined both my export and import contact list scripts.

The script can be found on TechNet Gallery:
Script Download: Invoke-SFBContacts

The parameters for Invoke-SFBContacts.ps1 is “Export” or “Import” for the mode and “File” used for the CSV file location. The script does require PowerShell v3 or newer.

If Invoke-SFBContacts.ps1 is run without any parameters the script will default to export mode and the contact list of the currently signed in Skype for Business account will be exported to c:\temp\SFBcontacts.csv. The CSV file has three columns, Group, Key and SIP. The Key column is used as a quick way of indicating unique entries, as a sip address could be a member of multiple groups. Also at this point the export function doesn’t work with Exchange Distribution Groups.

When Importing contacts there is a known issue where importing contacts into “Other Contacts” default group will fail (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) for contacts already added elsewhere in the contact list. I’ve blogged about issues with the “Other Contacts” group prior at: /2015/09/move-user-to-other-contacts/. The script can run multiple times and only imports missing contacts.

A couple days ago a fellow MVP, Rodolfo Castro ( asked me if he could publish an exe version that used my script as an example. Of course I had no issue with this and you can find more details at: Rodolf’s GUI looks like:

Although I’m still hoping for the day that the Skype for Business client get’s a builtin Contact Manager under the Tools menu. Until then you can find my script at:
Script Download: Invoke-SFBContacts

Hugo-Octopress Theme | Powered by Hugo