Skip to content

Commit

Permalink
Update script.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
uffemcev authored Apr 18, 2024
1 parent a45eae7 commit 31a8acd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions script.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,16 @@ if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:
}

#ПРОВЕРКА ПОЛИТИК
#if ($PSVersionTable.PSVersion.Major -gt 5) {
if ($PSVersionTable.PSVersion.Major -gt 5) {
import-module -Name 'Microsoft.PowerShell.Security' -RequiredVersion 3.0.0.0
if ((get-ExecutionPolicy) -ne 'bypass') {Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force}
get-ExecutionPolicy
pause
import-module microsoft.powershell.security
} else {
if ((get-ExecutionPolicy) -ne 'bypass') {Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force}
get-ExecutionPolicy
pause
#}
}

#ПРОВЕРКА WINGET
if ((Get-AppxPackage Microsoft.DesktopAppInstaller).Version -lt [System.Version]"1.21.2771.0") {
Expand Down

0 comments on commit 31a8acd

Please sign in to comment.