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 acd71a9 commit 5e28a8b
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions script.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,10 @@ if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:
}

#ПРОВЕРКА ПОЛИТИК
#if ((get-ExecutionPolicy) -ne 'bypass') {
get-ExecutionPolicy
write-host $PSHome
Get-Module
$env:PSModulePath -split ';'

pause

# if ($PSVersionTable.PSVersion.Major -gt 5) {import-module microsoft.powershell.security}
# Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force
#}
if ($PSVersionTable.PSVersion.Major -gt 5) {
import-module microsoft.powershell.security
if ((get-ExecutionPolicy) -ne 'bypass') {Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force}
}

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

0 comments on commit 5e28a8b

Please sign in to comment.