Question

Change Outlook appointments from FREE to BUSY

Asked by: ZENandEmailguy

We've migrated user calendars to Exchange 2007 and are finding that a large number of appointments were migrated into Exchange as FREE instead of BUSY as they were in the source email system.  We found this when users reported that they were doing busy searches with the scheduling assistant and user calendars were showing as totally open.  When we looked on the actual calendars, many calendars were completely full of appointments...all with a status of FREE.

Is there a powershell script or command that I can run against these people to force each calendar event to BUSY?

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-10-22 at 07:36:29ID24834691
Tags

Outlook Appointments Status

Topics

Exchange Email Server

,

Outlook Groupware Software

Participating Experts
2
Points
500
Comments
18

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. outlook calendar appointment option
    using outlook 2003 with exchange server 2003, would like to 'add others to an appointment only to show them the appointment on their calendar, not invite them as optional or required. I am not sure if this is an option. thanks.
  2. Calendar appointment deletion
    Is is possible to track who deleted an appointment from an Outlook calendar?
  3. Appointment in Outlook calendar
    Hi, I found an interesting sample code for adding/editing an appointment in the Outlook calendar: http://help.wugnet.com/office/editing-appointment-ftopict951065.html The insert works fine... but I can't understand what is "AppRDR" in the code?? Without it, I can't...
  4. timeframe for appointments in Calendars
    How long does Exchange keep appointments in the past for calendars?

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: chris_bottomleyPosted on 2009-10-22 at 09:22:28ID: 25635971

Hello ZENandEmailguy,

If the appointments are in the outlook client then a VB script can be used.  Save the following as something.vbs then execute from the command prompt or double click in the explorer.

Regards,

chris_bottomley

dim olApp
Dim olCal
Dim appt
Dim lngAppt
Const olBusy = 2
Const olfoldercalendar = 9  
    set olapp = createobject("outlook.application")
    Set olCal = olapp.session.GetDefaultFolder(olFolderCalendar)
    For lngAppt = 1 To olCal.items.count
        olCal.items(lngAppt).BusyStatus = olBusy
    Next

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:

Select allOpen in new window

 

by: ZENandEmailguyPosted on 2009-10-22 at 13:46:01ID: 25638823

Thank you for the script.  We tried to run this on one mailbox and got some sort of a scripting error.  I will post the error screen shot asap.

Scott

 

by: ZENandEmailguyPosted on 2009-10-22 at 13:50:08ID: 25638872

Here is the screen shot of the error that pops up.

  • 06.jpg
    • 18 KB

    Error screen shot when running above script

    Error screen shot when running above script
 

by: chris_bottomleyPosted on 2009-10-22 at 21:58:14ID: 25641451

Not every entry is necessarily an appointment.  Try this change

Chris

dim olApp
Dim olCal
Dim appt
Dim lngAppt
Const olBusy = 2
Const olfoldercalendar = 9
const olAppointment = 26
    set olapp = createobject("outlook.application")
    Set olCal = olapp.session.GetDefaultFolder(olFolderCalendar)
    For lngAppt = 1 To olCal.items.count
        If olCal.items(lngAppt).Class = olAppointment Then _
            olCal.items(lngAppt).BusyStatus = olBusy
    Next
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:

Select allOpen in new window

 

by: ZENandEmailguyPosted on 2009-10-25 at 21:42:59ID: 25659696

Didn't get a chance to test Friday due to a bunch of web server and OWA problems...Hopefully we'll be able to test the latest code Monday morning.

Thanks for the update.

 

by: ZENandEmailguyPosted on 2009-10-27 at 10:00:52ID: 25674765

I must be doing something incorrectly because I've copied the above 10/23 code into notepad and saved the file as free-busy-test2.vbs onto my desktop.  I open Outlook with a user who was migrated and has most of his old appointments and many of his new appointments showing a FREE.  My .vbs file just blinks and nothing appears to happen.  I closed Outlook and then double-clicked and it brought Outlook up but didn't appear to change the Free Status to Busy.

Ideas?

Thanks for your help so far.

 

by: chris_bottomleyPosted on 2009-10-27 at 10:07:55ID: 25674853

I didn't think it needed saving but just in case:

CHris

dim olApp
Dim olCal
Dim appt
Dim lngAppt
Const olBusy = 2
Const olfoldercalendar = 9
const olAppointment = 26
    set olapp = createobject("outlook.application")
    Set olCal = olapp.session.GetDefaultFolder(olFolderCalendar)
    For lngAppt = 1 To olCal.items.count
        If olCal.items(lngAppt).Class = olAppointment Then
            olCal.items(lngAppt).BusyStatus = olBusy
            olCal.items(lngAppt).save
    Next

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:

Select allOpen in new window

 

by: ZENandEmailguyPosted on 2009-10-27 at 11:08:40ID: 25675542

It sorta kinda works.  If I open Outlook and open the calendar and then open an appointment and then run the .vbs a couple of times (right click and choose Open on the shortcut or right click "open with" and choose Microsoft Windows-based script host) and have seen the status change from Free to Busy.  I don't need to save the appointment before closing it.

What I'm expecting is to open Outlook or let the vbs script open it for the user at their desk and then wait a few minutes and start checking random calendar events with the hopes that they will all be changed from Free to Busy.  

Am I missing something?

 

by: chris_bottomleyPosted on 2009-10-27 at 11:24:10ID: 25675703

If it was an outlook macro then I would hope so.  I'm not sure in the case of the VBS, try it with outlook closed and open outlook after it has run to check for updates.

Double check first from task manager to ensure there are no copies of outlook active.

Chris

 

by: ZENandEmailguyPosted on 2009-10-27 at 12:19:00ID: 25676299

Tried with Outlook closed and watched Task Manager show Outlook.exe running and then it shut off.  Nothing changed.

So I opened Outlook and went to calendar and changed the view to all appointments.  My test user has 524 on his calendar, including about 25 future ones.  I started with the 25 future ones by opening all of them.  Then I ran the .vbs you've provided and waited about 45 seconds and the status changed to BUSY on all.  I've gone back to the past appointments and am doing the same at about 50 or so per running.

Any idea why I would need to actually open the appointment window in order for the script to get the status to change?

Your script works and I appreciate your help beyond words...but for the 122 we may have to fix, it will take sometime.

Scott

 

by: chris_bottomleyPosted on 2009-10-27 at 12:28:08ID: 25676402

There is an eerror in teh supplied script ... you may have fixed it yourself but if not try the following in the VBS file

Chris

dim olApp
Dim olCal
Dim appt
Dim lngAppt
Const olBusy = 2
Const olFree = 1
Const olfoldercalendar = 9
Const olAppointment = 26
    Set olapp = createobject("outlook.application")
    Set olCal = olapp.session.GetDefaultFolder(olFolderCalendar)
    For lngAppt = 1 To olCal.items.count
        If olCal.items(lngAppt).Class = olAppointment Then
            olCal.items(lngAppt).BusyStatus = olfree
            olCal.items(lngAppt).save
        End if
    Next

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:

Select allOpen in new window

 

by: chris_bottomleyPosted on 2009-10-27 at 12:29:11ID: 25676413

Sorry Test status use this!

dim olApp
Dim olCal
Dim appt
Dim lngAppt
Const olBusy = 2
Const olFree = 1
Const olfoldercalendar = 9
Const olAppointment = 26
    Set olapp = createobject("outlook.application")
    Set olCal = olapp.session.GetDefaultFolder(olFolderCalendar)
    For lngAppt = 1 To olCal.items.count
        If olCal.items(lngAppt).Class = olAppointment Then
            olCal.items(lngAppt).BusyStatus = olbusy
            olCal.items(lngAppt).save
        End if
    Next
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:

Select allOpen in new window

 

by: chris_bottomleyPosted on 2009-10-27 at 13:35:58ID: 25677142

Okay

I have managed to do some testing and have hopefully resolved the problems.  It will be easier to run the script with outlook closed as otherwise there is a lot of flashing on screen.

Chris

Dim olCal
Dim appt
Dim lngAppt
Dim oInspect
Const olBusy = 2
Const olSave = 0
Const olfoldercalendar = 9
Const olAppointment = 26
 
    Set olApp = createobject("outlook.application")
    olApp.session.logon
    Set olCal = olapp.session.GetDefaultFolder(olFolderCalendar)
    For lngAppt = 1 To olCal.items.count
        If olCal.items(lngAppt).Class = olAppointment Then
            set oInspect = olCal.items(lngAppt).getinspector
            with olCal.items(lngAppt)
            	.BusyStatus = olBusy
            end With
            oInspect.close olsave
        End If
    Next

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:

Select allOpen in new window

 

by: billprewPosted on 2009-10-27 at 16:45:03ID: 25678867

Chris,

What's up with the Inspector object?  The documentation seemed pretty terse on that, what purpose did using it serve in this solution?  (Just trying to learn more about it...)

~bp

 

by: chris_bottomleyPosted on 2009-10-27 at 23:20:56ID: 25680346

Bill

The inspector basically accesses the object window.  It's precise function when compared with open I don't know but it has it's own properties and methods and in some cases renders an item accessible for changes, ('opens' it) that otherwise are ineffective.  Why it should provide an 'open' interface instead of simply opening the item I don't know, it's just one of those things i've picked up on.  It does however in my terms open the item and therefore when I have problems I try the inspector which was the case here.

Chris

 

by: billprewPosted on 2009-10-28 at 04:19:12ID: 25681935

>> Chris,

Fair enough and thanks for the explanation.  I'll have to file it away for future reference.

Hope you're well rested :-).

~bp

 

by: ZENandEmailguyPosted on 2009-10-28 at 13:44:05ID: 31644552

Thank you very much.  Writing code like you've done for me is a mystery.  I'm glad the simple tests/feedback to you helped you come up with the complete solution.  We've run the script on two accounts so far and had complete success.

 

by: chris_bottomleyPosted on 2009-10-28 at 13:47:13ID: 25688162

I'm very glad it seems to be working ... the worst thing about this medium is that it is difficult to understand what is going 'wrong' halfway across the world, (or across the road!) and factor that into the solutions.

For that reason I am sorry it took so long but very pleased to have been of help.

Chris

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...