“Free Ice Cream” – Harmless Office Email Prank Utilizing PowerShell

Unfortunately, I was caught when trying to manually send an email today when someone left their computer unlocked.

So, next time around, I’m prepared..

$OUTLOOK = "C:\Program Files (x86)\Microsoft Office\root\Office16\OUTLOOK.EXE"

function generateParticipants {
    $PARTICIPANT_LIST = $args[0]





function createEmail {
    $SUBJECT = $args[0]
    $BODY = $args[1]
    $TO_ARRAY = $args[2]

    $TO = generateParticipants $TO_ARRAY

    $MEETING_CONTENTS = "$TO&subject=$SUBJECT&body=$BODY"

    Start-Process -WindowStyle Maximized -FilePath "$OUTLOOK" -ArgumentList "/c  ipm.note /m `"$MEETING_CONTENTS`""

$EMAIL_SUBJECT = "Free Ice Cream!"
$EMAIL_BODY = "I'm Buying."

$PARTICIPANT_LIST = New-Object Collections.Generic.List[String]



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s