Created
January 29, 2019 11:46
-
-
Save JBlond/862b3269dd62a87de7adb872e1cca623 to your computer and use it in GitHub Desktop.
Remove windows app via PowerShell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$unerwuenschteApps = "xbox", "BingNews", "Dolby", "BingWeather", "Zune", "WindowsCamera", "WindowsMaps","Microsoft.People","PhotoShopExpress","Microsoft.OneConnect","Solitaire","Print3D","SoundRecorder","Duolingo","freshpaint" | |
$remove = $true | |
foreach($a in $unerwuenschteApps) | |
{ | |
Write-Host "Installierte Apps mit $a im Titel:" -ForegroundColor Yellow | |
$menge = Get-AppxPackage | where name -like "*$a*" # Get-AppxProvisionedPackage -Online / DisplayName | |
$menge | ft | |
if ($menge.length -eq 0) { Write-Host "Keine :-)" -ForegroundColor green } | |
else { if ($remove) { | |
"Entferne $($menge.length) Apps.." | |
$menge | Remove-AppxPackage # Remove-AppxProvisionedPackage -online | |
$menge = Get-AppxPackage | where name -like "*$a*" | |
if ($menge.length -gt 0) | |
{ | |
Write-Host "folgende Apps wurden NICHT entfernt:" -ForegroundColor red | |
$menge | ft | |
} | |
} | |
} | |
} | |
$unerwuenschteApps = "xbox", "BingNews", "Dolby", "BingWeather", "Zune", "WindowsCamera", "WindowsMaps","Microsoft.People","PhotoShopExpress","Microsoft.OneConnect","Solitaire","Print3D","SoundRecorder","Duolingo","freshpaint" | |
$remove = $true | |
foreach($a in $unerwuenschteApps) | |
{ | |
Write-Host "App-Pakete mit $a im Titel:" -ForegroundColor Yellow | |
$menge = Get-AppxProvisionedPackage -Online | where DisplayName -like "*$a*" | |
$menge | ft | |
if ($menge.length -eq 0) { Write-Host "Keine :-)" -ForegroundColor green } | |
else { if ($remove) { | |
"Entferne $($menge.length) App_Pakete.." | |
$menge | Remove-AppxProvisionedPackage -online | |
$menge = Get-AppxProvisionedPackage -Online | where DisplayName -like "*$a*" | |
if ($menge.length -gt 0) | |
{ | |
Write-Host "folgende Apps wurden NICHT entfernt:" -ForegroundColor red | |
$menge | ft | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment