I have the need to generate a list of all outlook folders and the total number of items listed beside each folder name. I thought I could simply modify the script from " http://blogs.technet.com/b/heyscriptingguy/archive/2009/01/26/how-do-i-use-windows-powershell-to-work-with-junk-e-mail-in-office-outlook.aspx" regarding the total number of items in the junk folder but no luck.
I thought I could just simply duplicate line 6 of the aforementioned script
"$folder = $namespace.getDefaultFolder($olFolders::olFolderJunk) " and change the folder name but getting the "Method invocation failed because [Microsoft.Office.Interop.Outlook.OlDefaultFolders] does not contain a method
named 'olFolder'.
At line:7 char:1
+ $folder = $namespace.getCurrentFolder($olFolders::olFolder("Design Engineering S ...
I've found a way to export a list of all these folders using exportoutlookfolders.vbs to a txt file but doesn't include total number of items.
Looking for any pointers on how to make this work. Don't expect anyone to write it for me but I am still learning PS. Would be great to find a way to import all of these folder and subfolder names into the script. Will be appreciative of any advice though. There's an enormous amount of Outlook folders.
Outlook 2013
Windows 8
Thanks,
Barry