Skip to content

Instantly share code, notes, and snippets.

@orcwarrior
Last active December 5, 2022 20:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orcwarrior/8b2eecb732b402331955b400ebcbc569 to your computer and use it in GitHub Desktop.
Save orcwarrior/8b2eecb732b402331955b400ebcbc569 to your computer and use it in GitHub Desktop.
Powershell script to install choco pkg manager and install basic suite of tools (git, node, webstorm, docker-desktop, jre, python)
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'))
param([switch]$Elevated)
function Test-Admin {
$currentUser = New-Object Security.Principal.WindowsPrincipal $([Security.Principal.WindowsIdentity]::GetCurrent())
$currentUser.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)
}
if ((Test-Admin) -eq $false) {
if ($elevated) {
# tried to elevate, did not work, aborting
} else {
Start-Process powershell.exe -Verb RunAs -ArgumentList ('-noprofile -noexit -file "{0}" -elevated' -f ($myinvocation.MyCommand.Definition))
}
exit
}
'running with full privileges'
choco install -y git nodejs python webstorm jre8 wsl2 docker-desktop putty slack dbeaver powertoys yarn
choco install -y pritunl-client
@orcwarrior
Copy link
Author

Updated to force latest LTS version of node

@orcwarrior
Copy link
Author

Updated to force latest LTS version of node

No longer the case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment