‎03-19-2015
08:00 PM
- last edited on
‎07-04-2023
04:47 PM
by
ErikT
Something I have put together to combat the dreadful spotify plague our network is having issues with. This will delete spotify from user pc and remove links for it. Last step is to run LSPUSH to send updated inventory back to server (you can modify it)
‎05-07-2019 06:06 PM
‎05-06-2019 06:12 PM
‎05-06-2019 06:11 PM
$AppsList = 'SpotifyAB.SpotifyMusic'
ForEach ($App in $AppsList){
$PackageFullName = (Get-AppxPackage $App).PackageFullName
$ProPackageFullName = (Get-AppxProvisionedPackage -online | where {$_.Displayname -eq $App}).PackageName
if ($PackageFullName){
remove-AppxPackage -package $PackageFullName
}
}
powershell.exe -exec bypass -enc JABBAHAAcABzAEwAaQBzAHQAIAA9ACAAJwBTAHAAbwB0AGkAZgB5AEEAQgAuAFMAcABvAHQAaQBmAHkATQB1AHMAaQBjACcADQAKAEYAbwByAEUAYQBjAGgAIAAoACQAQQBwAHAAIABpAG4AIAAkAEEAcABwAHMATABpAHMAdAApAHsADQAKACAAIAAgACAAJABQAGEAYwBrAGEAZwBlAEYAdQBsAGwATgBhAG0AZQAgAD0AIAAoAEcAZQB0AC0AQQBwAHAAeABQAGEAYwBrAGEAZwBlACAAJABBAHAAcAApAC4AUABhAGMAawBhAGcAZQBGAHUAbABsAE4AYQBtAGUADQAKACAAIAAgACAAJABQAHIAbwBQAGEAYwBrAGEAZwBlAEYAdQBsAGwATgBhAG0AZQAgAD0AIAAoAEcAZQB0AC0AQQBwAHAAeABQAHIAbwB2AGkAcwBpAG8AbgBlAGQAUABhAGMAawBhAGcAZQAgAC0AbwBuAGwAaQBuAGUAIAB8ACAAdwBoAGUAcgBlACAAewAkAF8ALgBEAGkAcwBwAGwAYQB5AG4AYQBtAGUAIAAtAGUAcQAgACQAQQBwAHAAfQApAC4AUABhAGMAawBhAGcAZQBOAGEAbQBlAA0ACgAgACAAIAAgAGkAZgAgACgAJABQAGEAYwBrAGEAZwBlAEYAdQBsAGwATgBhAG0AZQApAHsADQAKACAAIAAgACAAIAAgACAAIABXAHIAaQB0AGUALQBIAG8AcwB0ACAAIgBSAGUAbQBvAHYAaQBuAGcAIABQAGEAYwBrAGEAZwBlADoAIAAkAEEAcABwACIADQAKACAAIAAgACAAIAAgACAAIAByAGUAbQBvAHYAZQAtAEEAcABwAHgAUABhAGMAawBhAGcAZQAgAC0AcABhAGMAawBhAGcAZQAgACQAUABhAGMAawBhAGcAZQBGAHUAbABsAE4AYQBtAGUADQAKAAkAfQAgACAAIAAgAA0ACgB9AA==
‎05-06-2019 07:28 PM
PeterG wrote:
Shortened script to bare minimum because of LS command box limit of 1000 characters
$AppsList = 'SpotifyAB.SpotifyMusic'
ForEach ($App in $AppsList){
$PackageFullName = (Get-AppxPackage $App).PackageFullName
$ProPackageFullName = (Get-AppxProvisionedPackage -online | where {$_.Displayname -eq $App}).PackageName
if ($PackageFullName){
remove-AppxPackage -package $PackageFullName
}
}
encoded into single line commandpowershell.exe -exec bypass -enc JABBAHAAcABzAEwAaQBzAHQAIAA9ACAAJwBTAHAAbwB0AGkAZgB5AEEAQgAuAFMAcABvAHQAaQBmAHkATQB1AHMAaQBjACcADQAKAEYAbwByAEUAYQBjAGgAIAAoACQAQQBwAHAAIABpAG4AIAAkAEEAcABwAHMATABpAHMAdAApAHsADQAKACAAIAAgACAAJABQAGEAYwBrAGEAZwBlAEYAdQBsAGwATgBhAG0AZQAgAD0AIAAoAEcAZQB0AC0AQQBwAHAAeABQAGEAYwBrAGEAZwBlACAAJABBAHAAcAApAC4AUABhAGMAawBhAGcAZQBGAHUAbABsAE4AYQBtAGUADQAKACAAIAAgACAAJABQAHIAbwBQAGEAYwBrAGEAZwBlAEYAdQBsAGwATgBhAG0AZQAgAD0AIAAoAEcAZQB0AC0AQQBwAHAAeABQAHIAbwB2AGkAcwBpAG8AbgBlAGQAUABhAGMAawBhAGcAZQAgAC0AbwBuAGwAaQBuAGUAIAB8ACAAdwBoAGUAcgBlACAAewAkAF8ALgBEAGkAcwBwAGwAYQB5AG4AYQBtAGUAIAAtAGUAcQAgACQAQQBwAHAAfQApAC4AUABhAGMAawBhAGcAZQBOAGEAbQBlAA0ACgAgACAAIAAgAGkAZgAgACgAJABQAGEAYwBrAGEAZwBlAEYAdQBsAGwATgBhAG0AZQApAHsADQAKACAAIAAgACAAIAAgACAAIABXAHIAaQB0AGUALQBIAG8AcwB0ACAAIgBSAGUAbQBvAHYAaQBuAGcAIABQAGEAYwBrAGEAZwBlADoAIAAkAEEAcABwACIADQAKACAAIAAgACAAIAAgACAAIAByAGUAbQBvAHYAZQAtAEEAcABwAHgAUABhAGMAawBhAGcAZQAgAC0AcABhAGMAawBhAGcAZQAgACQAUABhAGMAawBhAGcAZQBGAHUAbABsAE4AYQBtAGUADQAKAAkAfQAgACAAIAAgAA0ACgB9AA==
‎05-06-2019 05:56 PM
$AppsList = 'SpotifyAB.SpotifyMusic'
ForEach ($App in $AppsList){
$PackageFullName = (Get-AppxPackage $App).PackageFullName
$ProPackageFullName = (Get-AppxProvisionedPackage -online | where {$_.Displayname -eq $App}).PackageName
write-host $PackageFullName
Write-Host $ProPackageFullName
if ($PackageFullName){
Write-Host "Removing Package: $App"
remove-AppxPackage -package $PackageFullName
}
else{
Write-Host "Unable to find package: $App"
}
if ($ProPackageFullName){
Write-Host "Removing Provisioned Package: $ProPackageFullName"
Remove-AppxProvisionedPackage -online -packagename $ProPackageFullName
}
else{
Write-Host "Unable to find provisioned package: $App"
}
}
powershell.exe -exec bypass -enc JABBAHAAcABzAEwAaQBzAHQAIAA9ACAAJwBTAHAAbwB0AGkAZgB5AEEAQgAuAFMAcABvAHQAaQBmAHkATQB1AHMAaQBjACcADQAKAA0ACgBGAG8AcgBFAGEAYwBoACAAKAAkAEEAcABwACAAaQBuACAAJABBAHAAcABzAEwAaQBzAHQAKQB7AA0ACgAgACAAIAAgACQAUABhAGMAawBhAGcAZQBGAHUAbABsAE4AYQBtAGUAIAA9ACAAKABHAGUAdAAtAEEAcABwAHgAUABhAGMAawBhAGcAZQAgACQAQQBwAHAAKQAu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AAYQBjAGsAYQBnAGUARgB1AGwAbABOAGEAbQBlACkAewANAAoAIAAgACAAIAAgACAAIAAgAFcAcgBpAHQAZQAtAEgAbwBzAHQAIAAiAFIAZQBtAG8AdgBpAG4AZwAgAFAAcgBvAHYAaQBzAGkAbwBuAGUAZAAgAFAAYQBjAGsAYQBnAGUAOgAgACQAUAByAG8AUABhAGMAawBhAGcAZQBGAHUAbABsAE4AYQBtAGUAIgANAAoAIAAgACAAIAAgACAAIAAgAFIAZQBtAG8AdgBlAC0AQQBwAHAAeABQAHIAbwB2AGkAcwBpAG8AbgBlAGQAUABhAGMAawBhAGcAZQAgAC0AbwBuAGwAaQBuAGUAIAAtAHAAYQBjAGsAYQBnAGUAbgBhAG0AZQAgACQAUAByAG8AUABhAGMAawBhAGcAZQBGAHUAbABsAE4AYQBtAGUADQAKACAAIAAgACAAfQANAAoAIAAgACAAIABlAGwAcwBlAHsADQAKACAAIAAgACAAIAAgACAAIABXAHIAaQB0AGUALQBIAG8AcwB0ACAAIgBVAG4AYQBiAGwAZQAgAHQAbwAgAGYAaQBuAGQAIABwAHIAbwB2AGkAcwBpAG8AbgBlAGQAIABwAGEAYwBrAGEAZwBlADoAIAAkAEEAcABwACIADQAKACAAIAAgACAAfQANAAoAfQA=
‎05-06-2019 05:40 PM
‎05-06-2019 04:26 PM
PeterG wrote:
Something I have put together to combat the dreadful spotify plague our network is having issues with. This will delete spotify from user pc and remove links for it. Last step is to run LSPUSH to send updated inventory back to server (you can modify it)
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now