Removed warning in Powershell 7 and higher

This commit is contained in:
amd64fox
2022-03-31 17:38:24 +03:00
parent 327a0181d8
commit 2a5e28764c
2 changed files with 2 additions and 2 deletions

View File

@@ -28,7 +28,7 @@ Stop-Process -Name Spotify
Stop-Process -Name SpotifyWebHelper
if ($PSVersionTable.PSVersion.Major -ge 7) {
Import-Module Appx -UseWindowsPowerShell
Import-Module Appx -UseWindowsPowerShell -WarningAction:SilentlyContinue
}
# Check version Windows
$win_os = (get-itemproperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ProductName).ProductName

View File

@@ -28,7 +28,7 @@ Stop-Process -Name Spotify
Stop-Process -Name SpotifyWebHelper
if ($PSVersionTable.PSVersion.Major -ge 7) {
Import-Module Appx -UseWindowsPowerShell
Import-Module Appx -UseWindowsPowerShell -WarningAction:SilentlyContinue
}
# Проверка версии Windows
$win_os = (get-itemproperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ProductName).ProductName