Skip to content

Instantly share code, notes, and snippets.

@najamsk
Created July 7, 2013 18:51
Show Gist options
  • Save najamsk/5944505 to your computer and use it in GitHub Desktop.
Save najamsk/5944505 to your computer and use it in GitHub Desktop.
get emails objects of any folder in your outlook inbox
function OutlookEmailLog($month)
{
#$outlook= New-object -ComObject outlook.application
#$namespace = $outlook. GetNameSpace("MAPI")
#$Inbox = $outlook. session.getDefaultFolder(6)
$Inbox = BootOutlook
$ELogs=$Inbox.Folders.item("islambox").Folders.Item("EmailLogs").Folders.Item($month)
$ELogs.items
}
$myLog = OutlookEmailLog "jul 2013"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment