Browse Source
Merge pull request #292 from bknickelbine/patch-1
Update remove-default-apps.ps1
pull/293/head
Alex Hirsch
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
2 deletions
-
scripts/remove-default-apps.ps1
|
|
@ -132,13 +132,14 @@ $apps = @( |
|
|
|
"Microsoft.Advertising.Xaml" |
|
|
|
) |
|
|
|
|
|
|
|
$appxprovisionedpackage = Get-AppxProvisionedPackage -Online |
|
|
|
|
|
|
|
foreach ($app in $apps) { |
|
|
|
Write-Output "Trying to remove $app" |
|
|
|
|
|
|
|
Get-AppxPackage -Name $app -AllUsers | Remove-AppxPackage -AllUsers |
|
|
|
|
|
|
|
Get-AppXProvisionedPackage -Online | |
|
|
|
Where-Object DisplayName -EQ $app | |
|
|
|
($appxprovisionedpackage).Where( {$_.DisplayName -EQ $app}) | |
|
|
|
Remove-AppxProvisionedPackage -Online |
|
|
|
} |
|
|
|
|
|
|
|