Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is it possible to create a PowerShell script that will go into a mailbox (specifically for a meeting room), find all it's meeting requests and accept them?

We've implemented a new mechanism in our exchange environment so that requests sent to meeting rooms will be auto-accepted if the room is available, but there are a lot of old requests (especially recurring meetings) that were sent before this change that are marked as tentative. This is a problem because when a new request is sent for a time that is marked as tentative, it will accept the request, which is leading to some conflicts.

share|improve this question
    
I'm not aware of any PowerShell cmdlets that do this, so you may be in EWS territory and have to write a program to do this. –  Ben Pilbrow Aug 25 '11 at 21:14

3 Answers 3

I'm a little late to the party; I imagine you're probably past this issue by now, but I just read this question today and thought it would be a fun exercise so here is the answer to your question. This bit of Powershell will log in to a Mailbox using the Outlook client, go through the Inbox and automatically accept any meeting invites. You can obviously tweak the code to be more to your liking (such as logging in to a different mailbox) but this would definitely get you started if you were still interested:

[Reflection.Assembly]::LoadWithPartialname("Microsoft.Office.Interop.Outlook") | Out-Null
$Folders = "Microsoft.Office.Interop.Outlook.OlDefaultFolders" -As [Type]
$Outlook = New-Object -ComObject Outlook.Application
$Namespace = $Outlook.GetNameSpace("MAPI")
$Inbox = $Namespace.getDefaultFolder($Folders::olFolderInbox)
ForEach ($_ In $Inbox.Items)
{
    If ($_.MessageClass -eq "IPM.Schedule.Meeting.Request") 
    {
        $AppointmentItem = $_.GetAssociatedAppointment($true)       
        $Response = $AppointmentItem.Respond(3,$True,$False)
        $Response.Send()
    }
}
share|improve this answer

Having just thumbed through all of the exchange cmd-lets, I can say I saw nothing that even touches appointments. I'm afraid you'll have to write it from .NET code, or go through by hand.

share|improve this answer
    
Writing a program up in .NET is an option, but what APIs would I be looking at? –  Evan M. Aug 26 '11 at 13:23
    
@EvanM For that, I wouldn't know. StackOverflow may be better for that. –  sysadmin1138 Aug 26 '11 at 14:10

What version of exchange are you running ? Exchange 2007 has a tool called Calendar Concierge

Ex2010 has Auto Accept Agent.

What you are requesting is already baked into Exchange

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.