# InstallChocolatey.ps1 # Check if Chocolatey is already installed if (Get-Command choco -ErrorAction SilentlyContinue) { Write-Host "Chocolatey is already installed." } else { # Set the execution policy to allow the script to run Set-ExecutionPolicy Bypass -Scope Process -Force # Install Chocolatey [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) # Confirm Chocolatey was installed if (Get-Command choco -ErrorAction SilentlyContinue) { Write-Host "Chocolatey installed successfully." } else { Write-Host "Failed to install Chocolatey." } }