Report on Outlook calendars

Hello,

Can anyone recommend a tool or a way of reporting on time spent based on meetings and appointments in an outlook calendar?
I heavily use categories and ideally want to be able to report on where my time is spent. We use Outlook 2013 and have an on premise Exchange 2013 server
LVL 6
vmdudeAsked:
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.

Nadav SolomonCommented:
I dont really like 3rd party tools that i dont know what they are doing in the background, here is a little powershell script that will do the work for you:
Change startDate, endDate and outputFile and paste it into powershell or save it as .ps1 file (to run a ps1 file you will need to change your powershell execution policy example: set-executionpolicy unrestricted)

#Start and End date depend on the regional settings.
$startDate = "10/18/2015"
$endDate = "10/24/2015"
$outputFile = "C:\Users\NAD\Desktop\Scripts\1.csv"
#####################################################################

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, categories | ?{
    $_.start -gt [datetime]$startDate -AND $_.start -lt [datetime]$endDate
} | sort-object Duration | export-csv -Path $outputFile

Open in new window

vmdudeAuthor Commented:
Thanks for the help, but getting lots of errors when running the script (see screenshot). Can you please give me any pointers on what may be wrong or how/where I should be running the script?

I'm running it on my windows 7 PC with Outlook 2013

Thanks
Output.PNG
Nadav SolomonCommented:
this specific error usually comes when you run outlook with one user and the script with another.
or maybe outlook is 32bit and the powershell console you opened is 64bit visa versa
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!

vmdudeAuthor Commented:
Ok managed to get it to work thanks :)

It doesn't seem to report on recurring meetings however - are you able to assist or advise on this please?
Nadav SolomonCommented:
Added recurring meetings and is working much faster now.
Enjoy :D

#Start and End date depend on the regional settings.
$startDate = "10/17/2015"
$endDate = "10/26/2015"
$outputFile = "C:\Users\NAD\Desktop\Scripts\1.csv"
#####################################################################

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)
$filter = "[START] >= '$startDate' and [END]<= '$endDate'"

$folderItems = $folder.items
$folderItems.IncludeRecurrences = $true
$folderItems.Sort("[Start]")
$folderItems = $folderItems.Restrict($filter)


$folderItems |Select-Object -Property Subject, Start, Duration, Location, categories | sort-object Start | export-csv -Path $outputFile

Open in new window

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
vmdudeAuthor Commented:
Brilliant works a treat! :)
Nadav SolomonCommented:
Glad I could help, thanks for the feedback.
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
Outlook

From novice to tech pro — start learning today.