mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-03-25 13:36:39 +01:00
Added uninstall-outlook.ps1
This commit is contained in:
parent
be9a93de82
commit
962d7d00b6
@ -2,7 +2,7 @@
|
||||
.SYNOPSIS
|
||||
Uninstalls the new Outlook
|
||||
.DESCRIPTION
|
||||
This PowerShell script uninstalls the new Outlook application.
|
||||
This PowerShell script uninstalls the new Outlook for Windows application.
|
||||
.EXAMPLE
|
||||
PS> ./uninstall-new-outlook.ps1
|
||||
.LINK
|
||||
@ -12,11 +12,11 @@
|
||||
#>
|
||||
|
||||
try {
|
||||
"⏳ Uninstalling new Outlook..."
|
||||
"⏳ Uninstalling new Outlook for Windows..."
|
||||
|
||||
Remove-AppxProvisionedPackage -AllUsers -Online -PackageName (Get-AppxPackage Microsoft.OutlookForWindows).PackageFullName
|
||||
|
||||
"✅ New Outlook has been removed."
|
||||
"✅ New Outlook for Windows has been removed."
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
24
scripts/uninstall-outlook.ps1
Normal file
24
scripts/uninstall-outlook.ps1
Normal file
@ -0,0 +1,24 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Uninstalls Outlook
|
||||
.DESCRIPTION
|
||||
This PowerShell script uninstalls Outlook for Windows.
|
||||
.EXAMPLE
|
||||
PS> ./uninstall-outlook.ps1
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
Author: Markus Fleschutz | License: CC0
|
||||
#>
|
||||
|
||||
try {
|
||||
"⏳ Uninstalling Outlook for Windows..."
|
||||
|
||||
Remove-AppxPackage -AllUsers -Package (Get-AppxPackage Microsoft.OutlookForWindows).PackageFullName
|
||||
|
||||
"✅ Outlook for Windows has been removed."
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
}
|
Loading…
Reference in New Issue
Block a user