Skip to content

Commit

Permalink
feat(setup.ps1): added powershell execution policy setup step
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexNabokikh committed Aug 14, 2022
1 parent b30ae1e commit 812a485
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions setup.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# Ensure PowerShell execution policy is set to RemoteSigned for the current user
$ExecutionPolicy = Get-ExecutionPolicy -Scope CurrentUser
if ($ExecutionPolicy -eq "RemoteSigned") {
Write-Verbose "Execution policy is already set to RemoteSigned for the current user, skipping..." -Verbose
}
else {
Write-Verbose "Setting execution policy to RemoteSigned for the current user..." -Verbose
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
}

# Ensure chocolatey installed
if ([bool](Get-Command -Name 'choco' -ErrorAction SilentlyContinue)) {
Write-Verbose "Chocolatey is already installed, skip installation." -Verbose
Expand Down

0 comments on commit 812a485

Please sign in to comment.