0

Thank you for taking the time to read this. The original post will be retained below, but I -think- I have a better way to phrase my question.

How do I re-write this powershell script which grabs appointment info from Outlook:

Add-type -assembly "Microsoft.Office.Interop.Outlook" | out-null
 $olFolders = "Microsoft.Office.Interop.Outlook.OlDefaultFolders" -as [type] 
 $outlook = new-object -comobject outlook.application
 $namespace = $outlook.GetNameSpace("MAPI")
 $folder = $namespace.getDefaultFolder($olFolders::olFolderCalendar)
 $folder.items |
 Select-Object -Property Subject, Start, Duration, Location, Body

into something that uses CDOEX and does the same thing, but for all users? Thank you.

-------Original Question: --------- I recently wrote a powershell script that grabs info from an Outlook calendar and generates a reminder email based on the info it finds. The script works beautifully, and then my boss tells me that it has to instead pull this info from an Exchange database and not Outlook. The script will be running directly on the exchange server, and will not need remote access.

Are there exchange com objects (Full disclosure, I know the term "com object" but I have little idea what they are) for exchange like their are for outlook or is as simple as pulling the info from a generic database that would happen to work for an exchange server?

As far as I'm aware, it will most likely be running in Powershell 1 and exchange server 2003. Please feel free to point me to any relevant websites where I can find this myself if need be. Any help would be appreciated. Thank you.

-Josh

Calon
  • 4,174
  • 1
  • 19
  • 30
Josh Alcorn
  • 158
  • 1
  • 17
  • What are you wanting to query from Exchange? – websch01ar Feb 20 '14 at 16:07
  • Well, we need to look through every user's calendar appointments for a specific string found in the subject/body, and then send a "reminder" email that contains the stuff we pull. It was super easy to pull from Outlook, but now it's got to be done directly from the exchange server. – Josh Alcorn Feb 20 '14 at 18:54

1 Answers1

1

look into exchange web services. You can use it to connect to mailboxes and read calendar entries. then do stuff.

Dane Boulton
  • 1,305
  • 1
  • 11
  • 15
  • Thank you for the advice. However, it appears that the EWS package isn't available for Exchange 2003. Anything else? – Josh Alcorn Feb 21 '14 at 14:29