Fix PS v7 compatibility

This fixes PowerShell +v7.0.0 compatibility issue
This commit is contained in:
Radek Zahradník 2021-07-26 09:22:08 +02:00 committed by GitHub
parent be4e443aae
commit 537be5f902
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,6 +23,11 @@ Write-Host 'Stopping Spotify...'`n
Stop-Process -Name Spotify
Stop-Process -Name SpotifyWebHelper
if ($PSVersionTable.PSVersion.Major -ge 7)
{
Import-Module Appx -UseWindowsPowerShell
}
if (Get-AppxPackage -Name SpotifyAB.SpotifyMusic) {
Write-Host @'
The Microsoft Store version of Spotify has been detected which is not supported.