No announcement yet.

Need help desperately

  • Filter
  • Time
  • Show
Clear All
new posts

  • Need help desperately

    Hello, thank you for taking the time to read this. I'm trying to write a powershell script that's going to run on an Exchange 2003 server. I need to read through EVERY users appointment data, and then generate an email containing certain info from the appointment. Apparently this can be done through the CDOEX, but I'm a newbie to powershell and exchange both.

    I found a script that works for 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:lFolderCalendar)
    $folder.items |
    Select-Object -Property Subject, Start, Duration, Location, Body

    And I need it to do the exact same thing, just for an Exchange 2003 database/server instead of outlook. If anybody could offer me some help, advice, or point me in the right direction I'd appreciate it. Thank you.