#Uninstall from current user and default user
#This also prevents these packages from being installed on new users
ForEach ($package in $PackagesToRemove) {
Write-Progress -Activity $package -PercentComplete ($PackagesToRemove.IndexOf($package)/$PackagesToRemove.Count * 100)
Get-AppxPackage $package | Remove-AppxPackage
Get-AppxProvisionedPackage -Online | Where-Object {$_.DisplayName -eq $package} | Remove-AppxProvisionedPackage -Online
} 作者: kevinyuri 時間: 2016-8-11 23:51