mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2026-08-10 01:51:18 +10:00
17 lines
459 B
PowerShell
17 lines
459 B
PowerShell
function Install-WinUtilChoco {
|
|
|
|
<#
|
|
|
|
.SYNOPSIS
|
|
Installs Chocolatey if it is not already installed
|
|
|
|
#>
|
|
if ((Test-WinUtilPackageManager -choco) -eq "installed") {
|
|
return
|
|
}
|
|
|
|
Write-Host "Chocolatey is not installed. Installing now..."
|
|
$installScript = Invoke-WebRequest -Uri https://community.chocolatey.org/install.ps1 -UseBasicParsing
|
|
Invoke-Command -ScriptBlock ([scriptblock]::Create($installScript.Content))
|
|
}
|