I am currently trying to add a custom property to an appointment in Exchange via EWS. Unfortunatley I am little stuck here.
Here is what I found so far (as I said no PS):
Any help is appreciated. Thanks!
The is no native way to do this via PsSH, yet, as noted, PoSH has full access to the .Net framework just like other MS Dev tools and others.
You have to take the guidance dev links, an incorporate the code / classes or create a class of your own making then use that class in your script.
See this guidance:
See also the following for implementation ideas:
Point of note...
Thanks for the response. Turns out I really was close.
As I said, I had been able to create an appointment.
$myGUID = [GUID]"32ed071d-932e-487e-ad14-cde3272cfcc7" $myProperty = new-object Microsoft.Exchange.WebServices.Data.ExtendedPropertyDefinition(` $myGUID,` # property GUID "myProperty",` # property name [Microsoft.Exchange.WebServices.Data.MapiPropertyType]::string` # property type )
Then you can use the SetExtendedProperty-method of the existing appointment, to add an instance of the defined property to the appointment:
$appointment.SetExtendedProperty($myProperty,"This is my String")
Finally you update the appointment:
I found everything I had been missing here:
You must be logged in to reply to this topic.