Created
January 12, 2018 17:04
-
-
Save sebug/994ee4033c32f4f4f1b0ac06327f7395 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add-Type -AssemblyName "Microsoft.Office.Interop.Outlook" | |
$outlook = New-Object -ComObject Outlook.Application | |
$namespace = $outlook.GetNamespace("MAPI") | |
$inbox = $namespace.GetDefaultFolder([Microsoft.Office.Interop.Outlook.OlDefaultFolders]::olFolderInbox) | |
$inbox.Items($inbox.Items.Count) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment