Invoke-SFBContacts is a PowerShell script leveraging the Lync Client SDK that exports or imports the contact list including groups for the account signed into the Skype for Business or Lync client. Default run mode without any paramaters will export the contact list of the current account to c:\temp\SFBcontacts.csv.
Microsoft.Office.Uc.dll and Microsoft.Lync.Model.dll Lync Client SDK files are encoded in script and extracted to $env:temp on execution.
Script can run multiple times and only imports missing items. Script is code signed.
Known Isssue: Importing contacts into "Other Contacts" default group will fail (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) for contacts already added elsewhere in contact list.
Requires PowerShell v3 or newer.
<# .Synopsis PowerShell Script that exports or imports the contact list and groups for the currently signed in Skype for Business/Lync client account. .DESCRIPTION Leveraging the Lync Client SDK this PowerShell script will either export or import the contact list including groups for the account signed into the Skype for Business or Lync client. Prerequisite: PowerShell v3 or newer (Windows Management Framework 3.0 https://www.microsoft.com/en-us/download/details.aspx?id=34595). .NOTES NAME: Invoke-SFBContacts.ps1 VERSION: 1.0 AUTHOR: Michael LaMontagne LASTEDIT: 06/23/2016 V 1.0 - June 2016 - Fast Publish. .LINK Website: http://realtimeuc.com Twitter: http://www.twitter.com/realtimeuc LinkedIn: http://www.linkedin.com/in/mlamontagne/ .EXAMPLE .\Invoke-SFBContacts.ps1 Description ----------- Runs script in Default Mode, which will export the contact list to c:\temp\SFBcontacts.csv .EXAMPLE .\Invoke-SFBContacts.ps1 export Description ----------- Runs script in Export Mode, which will export the contact list to c:\temp\SFBcontacts.csv .EXAMPLE .\Invoke-SFBContacts.ps1 export 'c:\test\contact.csv' Description ----------- Runs script in Export Mode, which will export the contact list to c:\test\contact.csv .EXAMPLE .\Invoke-SFBContacts.ps1 export -file 'c:\test\contact.csv' Description ----------- Runs script in Export Mode, which will export the contact list to c:\test\contact.csv .EXAMPLE .\Invoke-SFBContacts.ps1 import Description ----------- Runs script in Import Mode, which will import the contact list from c:\temp\SFBcontacts.csv .EXAMPLE .\Invoke-SFBContacts.ps1 import 'c:\test\contact.csv' Description ----------- Runs script in Import Mode, which will import the contact list from c:\test\contact.csv .EXAMPLE .\Invoke-SFBContacts.ps1 import -file 'c:\test\contact.csv' Description ----------- Runs script in Import Mode, which will import the contact list from c:\test\contact.csv #>
<#
.Synopsis
PowerShell Script that exports or imports the contact list and groups for the currently signed in Skype for Business/Lync client account.
.DESCRIPTION
Leveraging the Lync Client SDK this PowerShell script will either export or import the contact list including groups for the account signed
into the Skype for Business or Lync client.
Prerequisite:
PowerShell v3 or newer (Windows Management Framework 3.0 https://www.microsoft.com/en-us/download/details.aspx?id=34595).
.NOTES
NAME: Invoke-SFBContacts.ps1
VERSION: 1.0
AUTHOR: Michael LaMontagne
LASTEDIT: 06/23/2016
V 1.0 - June 2016 - Fast Publish.
.LINK
Website: http://realtimeuc.com
Twitter: http://www.twitter.com/realtimeuc
LinkedIn: http://www.linkedin.com/in/mlamontagne/
.EXAMPLE
.\Invoke-SFBContacts.ps1
Description
-----------
Runs script in Default Mode, which will export the contact list to c:\temp\SFBcontacts.csv
.EXAMPLE
.\Invoke-SFBContacts.ps1 export
Description
-----------
Runs script in Export Mode, which will export the contact list to c:\temp\SFBcontacts.csv
.EXAMPLE
.\Invoke-SFBContacts.ps1 export 'c:\test\contact.csv'
Description
-----------
Runs script in Export Mode, which will export the contact list to c:\test\contact.csv
.EXAMPLE
.\Invoke-SFBContacts.ps1 export -file 'c:\test\contact.csv'
Description
-----------
Runs script in Export Mode, which will export the contact list to c:\test\contact.csv
.EXAMPLE
.\Invoke-SFBContacts.ps1 import
Description
-----------
Runs script in Import Mode, which will import the contact list from c:\temp\SFBcontacts.csv
.EXAMPLE
.\Invoke-SFBContacts.ps1 import 'c:\test\contact.csv'
Description
-----------
Runs script in Import Mode, which will import the contact list from c:\test\contact.csv
.EXAMPLE
.\Invoke-SFBContacts.ps1 import -file 'c:\test\contact.csv'
Description
-----------
Runs script in Import Mode, which will import the contact list from c:\test\contact.csv
#>