Files
homelab-scripts/chocolatey.ps1
2020-11-26 12:35:05 -05:00

12 lines
536 B
PowerShell

# Install chocolatey if not installed
if (-Not (Get-Command "choco.exe" -ErrorAction SilentlyContinue)) {
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
}
# Install the apps from the config file
choco install C:\Users\jgaunt\Git\homelab-scripts/chocolatey.config -y
# Upgrade all installed apps
choco upgrade all -y