PowerShell/scripts/uninstall-new-outlook.ps1
2025-01-16 19:19:23 +01:00

25 lines
617 B
PowerShell
Executable File

<#
.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
}