From be9a93de8298cd50aac009388780b9f6686ec70b Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Tue, 14 Jan 2025 08:19:09 +0100 Subject: [PATCH] Added uninstall-new-outlook.ps1 --- scripts/uninstall-new-outlook.ps1 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 scripts/uninstall-new-outlook.ps1 diff --git a/scripts/uninstall-new-outlook.ps1 b/scripts/uninstall-new-outlook.ps1 new file mode 100644 index 00000000..5e6159d0 --- /dev/null +++ b/scripts/uninstall-new-outlook.ps1 @@ -0,0 +1,24 @@ +<# +.SYNOPSIS + Uninstalls the new Outlook +.DESCRIPTION + This PowerShell script uninstalls the new Outlook application. +.EXAMPLE + PS> ./uninstall-new-outlook.ps1 +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +try { + "⏳ Uninstalling new Outlook..." + + Remove-AppxProvisionedPackage -AllUsers -Online -PackageName (Get-AppxPackage Microsoft.OutlookForWindows).PackageFullName + + "✅ New Outlook has been removed." + exit 0 # success +} catch { + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +}