Link to home
Start Free TrialLog in
Avatar of vmdude
vmdudeFlag for United Kingdom of Great Britain and Northern Ireland

asked on

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
Avatar of Nadav Solomon
Nadav Solomon

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

Avatar of vmdude

ASKER

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
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
Avatar of vmdude

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of Nadav Solomon
Nadav Solomon

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of vmdude

ASKER

Brilliant works a treat! :)
Glad I could help, thanks for the feedback.