Voting button's in emails are one the long standing features of using Outlook with Exchange, in Exchange 2013 SP1 there is now support for responding to Vote requests with EWS . However there is still no direct support for sending a message with voting buttons in EWS, so in this post I'm going to show a method you can use to send a message with Voting Button in EWS by setting the PidLidVerbStream extended Property on a message which is documented in the http://msdn.microsoft.com/en-us/library/ee218541(v=exchg.80).aspx .
I used this property a few months back in another script for stopping ReplyAll on a message, this script uses much the same code with the addition of Hex values for the Voting options to include in the Message. Firstly each voting option you want to add uses the VoteOption Structure http://msdn.microsoft.com/en-us/library/ee218406(v=exchg.80).aspx . This is reasonable straight forward eg
$ApproveOption = "0400000007417070726F76650849504D2E4E6F74650007417070726F766500000000000000000001000000020000000200000001000000FFFFFFFF"
07 Length of the DisplayName eg the length of (Approve)
417070726F7665 (Approve in Hex)
08 Length of the MsgClsNameCount eg the length of (IPM.Note)
49504D2E4E6F7465 (IPM.Note in Hex)
07417070726F7665 Repeat of the DisplayName and Length
The rest of the options are listed in the documentation link the one interesting option is SendBehavior which allows you to control if you want the user to be prompted about the response of to just send it immediately. In my example scripts its set to prompt the user
The following script will send a message using EWS with Appove/Reject voting buttons I've put a download of this script here the code itself looks like