Hi,
I try script (worklet) for remove apps windows 10 (Spotify and WindowsStores.
But dont work, anyone idea? thx.
Script:
Start-Transcript -Path C:\SetupLog.txt -NoClobber Write-Output "Uninstalling default apps" $apps = @( "Microsoft.WindowsStore" "SpotifyAB.SpotifyMusic" ) foreach ($app in $apps) { Write-Output "Trying to remove $app" # Get the app version $appVersion = (Get-AppxPackage -Name $app).Version If ($appVersion){ # If the apps is found, remove it Get-AppxPackage -Name $app -AllUsers | Remove-AppxPackage -AllUsers } # Remove the app from the local Windows Image to prevent re-install on new user accounts Get-AppXProvisionedPackage -Online | Where-Object DisplayName -EQ $app | Remove-AppxProvisionedPackage -Online # Cleanup Local App Data $appPath="$Env:LOCALAPPDATA\Packages\$app*" Remove-Item $appPath -Recurse -Force -ErrorAction 0 }