Browse by Tags

All Tags » Outlook (RSS)

Create a calendar item

Continuing the occasional look at Outlook automation its time to see how we create a calendar item function new-calendaritem { param ( [string] $mailbox , [datetime] $start , [datetime] $end , [string] $subject , [string] $location , [string] $body )...
Posted by RichardSiddaway | with no comments

Outlook: removing calendar entries

We recently looked at dumping the Calendar entries http://msmvps.com/blogs/richardsiddaway/archive/2011/08/23/outlook-viewing-calendar-entries.aspx   I usually leave entries to build up in the Calendar but a simple clean operation is to delete everything...
Posted by RichardSiddaway | with no comments
Filed under: ,

Outlook: Viewing Calendar Entries

We have seen how to view emails – this is how to view items in your calendar function get-calendaritem { $outlook = New-Object -ComObject Outlook.Application get-mailfolders | where { $_ . Path -like "*calendar*" -and $_ . Path -notlike "...
Posted by RichardSiddaway | 2 comment(s)
Filed under: ,

Outlook: sending emails

We’ve looked at examining the email folders and their contents, as well as cleaning out old emails. Its time to look at sending emails. This function shows the skeleton of the process function send-mailitem { param ( [string] $to , [string] $from , [string...
Posted by RichardSiddaway | with no comments
Filed under: ,

Outlook: deleting mail items

As promised here is the function to delete mail items in a specific folder function remove-mailitem { [ CmdletBinding ( SupportsShouldProcess = $true ) ] param ( [ parameter ( Mandatory = $true ) ] [string] $mailfolder , [datetime] $start , [datetime...

Outlook: Viewing mail items

Continuing our perambulation around Outlook when used with multiple hotmail accounts its time to look at the other folders and the mail items they contain. This post will show how to view the mail items and a future post will show how to delete items...

Clearing junk mail

Getting back to looking at working with Outlook we can adapt the function used to deleted the contents of the Deleted Items folder to work with the Junk mail folders function clear-junkmail { $outlook = New-Object -ComObject Outlook.Application get-mailitemcount...

Outlook folder item count revisited

I started this series http://msmvps.com/blogs/richardsiddaway/archive/2011/07/30/outlook-connector-amp-mail-folder-item-count.aspx by looking at how we could enumerate the mail folders in Outlook 2010 when I had had four hotmail accounts open.  The...

Emptying the Deleted folders–version 2

The original version of this function only did one pass at deleting and had to iterate through all of the folders to find the Deleted Items folder.  This time we use the collection of folders we created using the get-mailfolders function to go directly...

Outlook folders

The functions we’ve seen so far have involved iterating through the whole set of Outlook folders. That’s a lot of folders (I have 4 email accounts with lost of folders). The trick is to do this just once and then use the GetFolderFromID method at the...

Emptying the Deleted Items Folder

Continuing our look at scripting against Outlook & the hotmail connector Many of the emails I get end up being read once and deleted. This leaves a ton of stuff in the deleted items folders. Periodically I’ll clean these up. This is one way how it...