Create chocolatey.ps1
This commit is contained in:
12
chocolatey.ps1
Normal file
12
chocolatey.ps1
Normal file
@@ -0,0 +1,12 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user