Start-Outlook.ps1


Description

Purpose

Starts Microsoft Outlook.

Detailed Description

The Start-Outlook function is used to start Microsoft Outlook. It provides an option to start the old version of Outlook using the -UseOldVersion switch.

Back to Top

Usage

Example 1

Start-Outlook

Starts the latest version of Microsoft Outlook.

Example 2

Start-Outlook -UseOldVersion

Starts the old version of Microsoft Outlook.

Back to Top

Notes

No additional notes.

Back to Top


Script


<#
.SYNOPSIS
Starts Microsoft Outlook.

.DESCRIPTION
The Start-Outlook function is used to start Microsoft Outlook. It provides an option to start the old version of Outlook using the -UseOldVersion switch.

.PARAMETER UseOldVersion
Use this switch to start the old version of Outlook.

.EXAMPLE
Start-Outlook
Starts the latest version of Microsoft Outlook.

.EXAMPLE
Start-Outlook -UseOldVersion
Starts the old version of Microsoft Outlook.

#>
function Start-Outlook {
    param (
        [Parameter(Mandatory = $false, HelpMessage = "Use this switch to start the old version of Outlook.")]
        [switch]$UseOldVersion
    )

    $OutlookProcessName = if ($UseOldVersion) { "outlook.exe" } else { "olk.exe" }
    Start-Process -FilePath $OutlookProcessName -ErrorAction Stop
    Write-Verbose -Message "Outlook has been started."
}

Back to Top

Download

Please feel free to copy parts of the script or if you would like to download the entire script, simply click the download button. You can download the complete repository in a zip file by clicking the Download link in the menu bar on the left hand side of the page.


Report Issues

You can report an issue or contribute to this site on GitHub. Simply click the button below and add any relevant notes. I will attempt to respond to all issues as soon as possible.

Issue


Back to Top