29 lines
845 B
PowerShell
29 lines
845 B
PowerShell
# Run as Administrator
|
|
$AppsToRemove = @(
|
|
"Microsoft.Windows.WebExperience",
|
|
"Microsoft.XboxApp",
|
|
"Microsoft.OutlookApp",
|
|
"Hub de commentaires",
|
|
"Xbox TCUI",
|
|
"Xbox Identity Provider",
|
|
"Power Automate",
|
|
"Microsoft.MicrosoftStickyNotes",
|
|
"Microsoft.BingWeather",
|
|
"Microsoft Teams",
|
|
"Microsoft OneDrive"
|
|
)
|
|
|
|
# Remove provisioned packages for new users
|
|
foreach ($App in $AppsToRemove) {
|
|
Write-Host "Removing provisioned package: $App"
|
|
Get-AppxProvisionedPackage -Online |
|
|
Where-Object {$_.DisplayName -eq $App} |
|
|
Remove-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue
|
|
}
|
|
|
|
# Remove for current user
|
|
foreach ($App in $AppsToRemove) {
|
|
Write-Host "Removing app from current user: $App"
|
|
Get-AppxPackage -Name $App | Remove-AppxPackage -ErrorAction SilentlyContinue
|
|
}
|