Prathamesh Wagh
Prathamesh Wagh

Reputation: 55

PowerShell script to create Skype meeting in Outlook

I am able to create a code to create an appointment in outlook using Powershell. I want to create Skype meeting in outlook but not able to do that.

I wrote below script to create appointment in outlook

$Outlook = New-Object -ComObject Outlook.Application
$OutlookFolders = $Outlook.Session.Folders.Item(1).Folders
$tzs = $Outlook.TimeZones
$NewEvent = $Outlook.CreateItem(1)
$NewEvent.Subject = "Meeting";
$NewEvent.Start = [datetime]”6/13/2019 19:00"
$NewEvent.End = [datetime]"6/13/2019 20:00"
$NewEvent.SendUsingAccount = '[email protected]'
$NewEvent.Recipients('[email protected]')
$NewEvent.save()

I want to create a Skype meeting.

Upvotes: 0

Views: 1176

Answers (1)

Eugene Astafiev
Eugene Astafiev

Reputation: 49405

The Outlook object model doesn't provide any property or method for creating Skype meetings. What you see in Outlook UI is an add-on for Outlook. You can try to execute the ribbon button programmatically, see CommandBars.Execute method. You just need to pass the idMso value of the built-in control.

You can create a meeting using the Skype for Business User API (UCWA), which is now available for Skype for Business Online (Office 365).

POST   `https://lyncweb.contoso.com/ucwa/oauth/v1/applications/103...740/onlineMeetings/myOnlineMeetings HTTP/1.1`
  Accept: application/json
  Content-Type: application/json
  Authorization: Bearer cwt=AAEB...buHc
  X-Ms-Origin: http://localhost
  X-Requested-With: XMLHttpRequest
  Referer: https://lyncweb.contoso.com/Autodiscover/XFrame/XFrame.html
  Accept-Language: en-US
  Accept-Encoding: gzip, deflate
  User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; Trident/6.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; InfoPath.3)
  Host: lyncweb.contoso.com
  Content-Length: 185
  DNT: 1
  Connection: Keep-Alive
  Cache-Control: no-cache
  {
      "attendanceAnnouncementsStatus":"Disabled",
      "description":"hey guys let's do a musical!",
      "subject":"holiday party",
      "attendees": ["sip:[email protected]","sip:[email protected]"],
      "leaders": []
  }

For your reference you may take a look:

Upvotes: 1

Related Questions