Meeting Request Exchange Web Services PowerShell
Hello,
We previously saw how to send an email with Exchange Web Services, now we’ll see how to send a meeting request with EWS and PowerShell.
I’m not aware of another way to create meeting request in PowerShell, so, this is not a pure learning experience now.
First, we need to connect to Exchange Web Services, just like we did for sending an email:
Import-Module -Name 'C:Program FilesMicrosoftExchangeWeb Services2.2Microsoft.Exchange.WebServices.dll' $Credential = Get-Credential $exchService = New-Object -TypeName Microsoft.Exchange.WebServices.Data.ExchangeService $exchService.Credentials = New-Object -TypeName Microsoft.Exchange.WebServices.Data.WebCredentials -ArgumentList $Credential.UserName, $Credential.GetNetworkCredential().Password $exchService.AutodiscoverUrl($Credential.UserName, {$true})
Just like for email, you need an account with a mailbox.
Meeting Request Exchange Web Services PowerShell
Now we’ve imported the dll and we’re connected, we can create an ‘appointment’ object, and use it to build a request meeting:
$Start = Get-Date $MeetingRequest = New-Object -TypeName Microsoft.Exchange.WebServices.Data.appointment -ArgumentList $exchService $MeetingRequest.Subject = 'Appointment subject' $MeetingRequest.Body = 'This is the body of the request meeting' $MeetingRequest.RequiredAttendees.Add('Anakin.Skywalker@itfordummies.net') | Out-Null $MeetingRequest.Start = $Start $MeetingRequest.End = $MeetingRequest.Start.AddMinutes(30) $MeetingRequest.Location = 'Location of the meeting' $MeetingRequest.ReminderDueBy = Get-Date $MeetingRequest.IsResponseRequested = $false $MeetingRequest.Save([Microsoft.Exchange.WebServices.Data.SendInvitationsMode]::SendToAllAndSaveCopy)
Just like email, we got some options about saving and sending:
There is a lot of possible ways to handle request meeting saving.
And here is the created meeting request:
This is just an example of what we can do with Exchange Web Services, there is plenty of interesting things we can do with it.
Hi!
is it possible to access a shared mailbox with an a account that have fullaccess set?
Office 365
/Patric
I don’t think so, but you should definitely try it and tell us