PowerShell/docs/uninstall-new-outlook.md
2025-01-17 08:37:30 +01:00

1.3 KiB

The uninstall-new-outlook.ps1 Script

This PowerShell script uninstalls the new Outlook for Windows application.

Parameters

/Repos/PowerShell/scripts/uninstall-new-outlook.ps1 [<CommonParameters>]

[<CommonParameters>]
    This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, 
    WarningVariable, OutBuffer, PipelineVariable, and OutVariable.

Example

PS> ./uninstall-new-outlook.ps1

Notes

Author: Markus Fleschutz | License: CC0

https://github.com/fleschutz/PowerShell

Script Content

<#
.SYNOPSIS
	Uninstalls the new Outlook
.DESCRIPTION
	This PowerShell script uninstalls the new Outlook for Windows application.
.EXAMPLE
	PS> ./uninstall-new-outlook.ps1
.LINK
	https://github.com/fleschutz/PowerShell
.NOTES
	Author: Markus Fleschutz | License: CC0
#>

try {
	"⏳ Uninstalling new Outlook for Windows..."

	Remove-AppxProvisionedPackage -AllUsers -Online -PackageName (Get-AppxPackage Microsoft.OutlookForWindows).PackageFullName
	
	"✅ New Outlook for Windows has been removed."
	exit 0 # success
} catch {
	"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
	exit 1
}

(page generated by convert-ps2md.ps1 as of 01/17/2025 08:37:12)