Showing posts with label outlook. Show all posts
Showing posts with label outlook. Show all posts

Friday, January 12, 2018

powershell assisting with mails

ExtractAttachedMails.ps1 is used for extracted alla attached mails in a outlook .msg-file to specified folder.
CatalogueMails.ps1 is used for indexing the mails to more easily filter on timestamps and senders.

This came in handy when a happy user sent me 45 attached mails with the same subjectline so the extractionprocess also throws in an indexnumber to avoid namingconflicts.

Tuesday, January 26, 2016

A fun script for creating meetings in Outlook.
For the very lazy admin

function createMeeting(
    $Subject = "Test Meeting",
    $body = "Just Testing",
    $location = "Here",
    $start = "1/26/2016 12:00 PM",
    $duration = 60,
    $reminderSet = $true,
    $reminderMinutesBeforeStart = 15
    )
{
$olAppointmentItem = 1
$o = New-Object -comobject outlook.application
$a = $o.CreateItem($olAppointmentItem)
$a.MeetingStatus.olMeeting
$a.Start = $start
$a.Duration = $duration
$a.Subject = $Subject
$a.body = $body
$a.Location = $location
$a.ReminderMinutesBeforeStart = $reminderMinutesBeforeStart
$a.reminderSet = $true
$result = $a.Save()
}


$Duration = 60
$Subject = "Test1"
$Body = "testar2"
$Location="Office"
$ReminderMinutesBeforeStart = 30
$reminderSet = $true

#This scenario is set of dates with same meeting time
$arrayOfDates =  "2016-01-26", "2016-01-27","2016-01-28"
$hour = 10
$minute = 00
for ($i=0;$i -le ($ArrayOfDates.count-1);$i++) {
$dateTime = get-date $ArrayOfDates[$i] -Hour $hour -Minute $minute
$dateTime
createMeeting -Subject $Subject -body $Body -location $Location -reminderSet $reminderSet -reminderMinutesBeforeStart $ReminderMinutesBeforeStart -duration $Duration -start $dateTime
}

References:
https://social.technet.microsoft.com/Forums/windowsserver/en-US/077733c5-6e39-489e-908a-d3098c512a71/need-to-create-meeting-request-using-powershell-with-outlook-2010-2013?forum=winserverpowershell

Powershell and Uptimerobot

Uptimerobot can be quite tedious when you need to update many monitors at once. For example say you bought the license for Uptimerobot and n...