mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-11 20:48:17 +02:00
Add install-chocolatey.ps1
This commit is contained in:
parent
5988b9d42a
commit
a05dcd7c48
23
Scripts/install-chocolatey.ps1
Normal file
23
Scripts/install-chocolatey.ps1
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Installs Chocolatey (needs admin rights)
|
||||||
|
.DESCRIPTION
|
||||||
|
This PowerShell script installs Chocolatey onto the local computer (needs admin rights).
|
||||||
|
.EXAMPLE
|
||||||
|
PS> ./install-chocolatey
|
||||||
|
.LINK
|
||||||
|
https://github.com/fleschutz/PowerShell
|
||||||
|
.NOTES
|
||||||
|
Author: Markus Fleschutz | License: CC0
|
||||||
|
#>
|
||||||
|
|
||||||
|
#Requires -RunAsAdministrator
|
||||||
|
|
||||||
|
try {
|
||||||
|
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
|
||||||
|
iwr https://community.chocolatey.org/install.ps1 -UseBasicParsing | iex
|
||||||
|
exit 0 # success
|
||||||
|
} catch {
|
||||||
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
exit 1
|
||||||
|
}
|
@ -66,6 +66,7 @@ function ListTools {
|
|||||||
CheckFor cc "--version"
|
CheckFor cc "--version"
|
||||||
CheckFor chdsk ""
|
CheckFor chdsk ""
|
||||||
CheckFor chkntfs ""
|
CheckFor chkntfs ""
|
||||||
|
CheckFor choco "--version"
|
||||||
CheckFor cipher ""
|
CheckFor cipher ""
|
||||||
CheckFor cksum "--version"
|
CheckFor cksum "--version"
|
||||||
CheckFor clang "--version"
|
CheckFor clang "--version"
|
||||||
|
Loading…
Reference in New Issue
Block a user