Powershell from Microsoft used to send a automated message in skype for business messenger.
Lync 2013 SDK installed in the target machine and used the Microsoft.Lync.Model.DLL available in the program files. API’s available in the DLL has been utilized to trigger all the required functionalities such as send a message, join a meeting room, join a conference room etc
Download and install the powershell using the below URL;
To manage the Lync 2013 SDK in the windows x64 bit machine; Refer the below URL;
Please find the below code snippet to trigger an automated message using the powershell script and refer the below video to know about the script functionality in detail;
$assemblyPath = “C:\Program Files (x86)\Microsoft Office 2013\LyncSDK\Assemblies\Desktop\Microsoft.Lync.Model.DLL”
Import-Module $assemblyPath
$IMType = 1
$PlainText = 0
$cl = [Microsoft.Lync.Model.LyncClient]::GetClient()
$conv = $cl.ConversationManager.AddConversation()
$username = “gopikannamailbox@gmail.com”
$getuser = $cl.ContactManager.GetContactByUri($username)
$null = $conv.AddParticipant($getuser)
$msg = New-Object “System.Collections.Generic.Dictionary[Microsoft.Lync.Model.Conversation.InstantMessageContentType,String]”
$msg.Add($PlainText, “Test message by robo using powershell”)$m = $conv.Modalities[$IMType]
$null = $m.BeginSendMessage($msg, $null, $msg)
For more scripts to automate skype for business, please use my github repo;
https://github.com/gopekanna/test_Skype_PeertoPeer_Instant
https://github.com/gopekanna/test_Skype_AudioVideo_Sharing
My script is not working. Is it mandatory to install Lync 2013 ??? Actually I installed 32bit Lync instead of 64bit and now I am not able to uninstall it . What should I do ???
LikeLike
You should install 32-bit only and the same assembly will be available in the below location
C:\Program Files (x86)\Microsoft Office 2013\LyncSDK\Assemblies\Desktop\Microsoft.Lync.Model.DLL
LikeLike
@ GopiKannan nice work can you share me the same power shell script to make a Skype for Business call to contacts?
LikeLike