Exchange 2010 Auto-Populating Calendar

I want to give everyone OWA and BlackBerry Access to employee's calendars.  However, Blackberry only allows access to calendar owners.  Instead of having everyone own everyone elses calendar I want to create a group calendar that everyone has ownership privlidges too.

I then want to write a script to periodically go run through everyone's personal office calendar and add all of those events to that group calendar.

Any ideas how I can get started to do this?  Moreover, is this even possible?

I have .NET and VBA at my disposal as well.  But perhaps this is a job for Exchange Powershell.

Thanks,
JOe K.
ClaudeWalkerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

andytagonistCommented:
Authenticated Users would be a good place to start...
0
ClaudeWalkerAuthor Commented:
Hmmm.  Could you elaborate on that?  It seems that authenticated users would be involved with permissions.  Giving permissions will simply allow sharing and not populating.  Maybe I'm missing your point.

Thanks,
JOe K.
0
AmitIT ArchitectCommented:
For first query you can create public folder calendar, how? Steps are below

http://support.sherweb.com/Faqs/Show/how-to-create-a-public-calendar-exchange-2010

For second query: Answer is not possible.
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

sirakovCommented:
I would go for shared mailbox. With Exchange 2010 SP1+ and his automaping feature, you would have all your users share the same calendar and the shared mailbox automatically added to the users Outlook account.
http://atthedatacenter.wordpress.com/2010/09/28/create-a-shared-mailbox-in-microsoft-exchange-2010-and-add-to-owa/
0
sirakovCommented:
I do not really agree with amitkulshrestha.
Public folder calendar its not really good because Free/Busy can not be queried by the Availability service on a public folder.
Also using .NET and exchange web services you could create your query.
http://msdn.microsoft.com/en-us/library/bb408521(v=exchg.140).aspx
here is a description :
http://msdn.microsoft.com/en-us/library/bb204119(v=exchg.140).aspx
...Microsoft Exchange Server 2010 provides Exchange Web Services as an extensibility point for clients that connect to the Exchange server and consume information about user availability, and the manipulation of items that are located in the Exchange data store....
and here is an example :
http://weblogs.asp.net/psperanza/archive/2008/03/18/getting-calendar-items-using-exchange-web-services.aspx
0
ClaudeWalkerAuthor Commented:
Cool, I'll look into these solutions.


I have started a VB.NET console app.  I can get it to read all of my calendar events but I haven't figured out the syntax to read a calendar I have permissions with.  I've attached the code incase you can see where I need to change it.
Sub GetAllCalendarItems()

        Dim oApp As Microsoft.Office.Interop.Outlook.Application = New Microsoft.Office.Interop.Outlook.Application()
        Dim mapiNamespace As Microsoft.Office.Interop.Outlook.NameSpace = oApp.GetNamespace("MAPI")

        'works for default
        Dim CalendarFolder As Microsoft.Office.Interop.Outlook.MAPIFolder = mapiNamespace.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderCalendar)

        'CAN'T FIGURE OUT SHARED

        'Dim oRecip As Microsoft.Office.Interop.Outlook.Recipient = mapiNamespace.CreateRecipient("0076@projecthomewi.org")
        'Dim oRecip As Microsoft.Office.Interop.Outlook.Recipient = mapiNamespace.GetRecipientFromID("0076@projecthomewi.org")
        'Dim CalendarFolder As Microsoft.Office.Interop.Outlook.MAPIFolder = mapiNamespace.GetSharedDefaultFolder(oRecip, Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderCalendar)

        Dim outlookCalendarItems As Microsoft.Office.Interop.Outlook.Items = CalendarFolder.Items

        outlookCalendarItems.IncludeRecurrences = True
        Dim apptItem As Microsoft.Office.Interop.Outlook.AppointmentItem

        For Each apptItem In outlookCalendarItems
            Console.WriteLine(apptItem.Subject + " -> " + apptItem.Start.ToLongDateString())
        Next apptItem
        Dim a As String = Console.ReadLine("tests")


    End Sub

Open in new window

0
sirakovCommented:
Well, I'm more comfortable reading C# but using Microsoft.Office.Interop.Outlook.Application class, you just take advantage of the exposed methods and like this simulating Outlook.
Have a look here :
http://stackoverflow.com/questions/7335959/what-is-exchange-web-services-better-suited-to-do-than-office-interop
And for an another example :
http://blogs.planetsoftware.com.au/paul/archive/2010/05/19/exchange-web-services-ews-managed-api-ndash-part-1.aspx 
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ClaudeWalkerAuthor Commented:
So far I've been able to access EWS using default credentials however, I can't figure out how to access everyone's calendar.


// THIS WORKS

ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP1);
                service.UseDefaultCredentials = true;
                //service.Url = new Uri("https://mydomain/EWS/Exchange.asmx");
                service.Url = new Uri
                /*Appointment appointment = new Appointment(service);
                appointment.Subject = "Dentist Appointment";
                appointment.Body = "The appointment is with Dr. Smith.";
                appointment.Start = new DateTime(2012, 1, 3, 9, 0, 0);
                appointment.End = appointment.Start.AddHours(2);
                appointment.Save(SendInvitationsMode.SendToNone);*/

Open in new window

0
ClaudeWalkerAuthor Commented:
GOT IT!

I also had to use this cmdlet in EMS:

New-ManagementRoleAssignment –Name:impersonationAssignmentName –Role:ApplicationImpersonation –User:myLogin

Thanks so much,
JOe K.
static void Main(string[] args)
{
try
{

ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP1);
service.Url = new Uri("https://myDomain.com/EWS/Exchange.asmx");

service.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, "otherUsersEmail@myDomain.com");
Folder calendar = Folder.Bind(service, WellKnownFolderName.Calendar);

foreach (Item item in calendar.FindItems(new ItemView(100)))
{
Console.WriteLine(item.Subject);
}

Console.ReadLine();    

}
catch (Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
Console.ReadLine();
}

Open in new window

0
sirakovCommented:
Actually you solved you issue yourself and it was great learning experience for me as well.
Thanks for sharing!
Good luck in the future!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Exchange

From novice to tech pro — start learning today.