mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-03-28 15:46:35 +01:00
Added uninstall-outlook.ps1
This commit is contained in:
parent
be9a93de82
commit
962d7d00b6
@ -2,7 +2,7 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Uninstalls the new Outlook
|
Uninstalls the new Outlook
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script uninstalls the new Outlook application.
|
This PowerShell script uninstalls the new Outlook for Windows application.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./uninstall-new-outlook.ps1
|
PS> ./uninstall-new-outlook.ps1
|
||||||
.LINK
|
.LINK
|
||||||
@ -12,11 +12,11 @@
|
|||||||
#>
|
#>
|
||||||
|
|
||||||
try {
|
try {
|
||||||
"⏳ Uninstalling new Outlook..."
|
"⏳ Uninstalling new Outlook for Windows..."
|
||||||
|
|
||||||
Remove-AppxProvisionedPackage -AllUsers -Online -PackageName (Get-AppxPackage Microsoft.OutlookForWindows).PackageFullName
|
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
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ 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