Skip to content

Instantly share code, notes, and snippets.

@kupiakos
Last active February 5, 2018 23:57
Show Gist options
  • Save kupiakos/1763617c76c1a13e7d496b4c4e72d691 to your computer and use it in GitHub Desktop.
Save kupiakos/1763617c76c1a13e7d496b4c4e72d691 to your computer and use it in GitHub Desktop.
Install chocolatey and desired packages on the IT 567 Lab Computers
# Run in Administrator PowerShell
# First: Set-ExecutionPolicy RemoteSigned -Force
# Or: Set-ItemProperty -Path HKLM:\Software\Policies\Microsoft\Windows\PowerShell -Name ExecutionPolicy -Value RemoteSigned
# Then: iwr -UseBasicParsing https://gist.githubusercontent.com/kupiakos/1763617c76c1a13e7d496b4c4e72d691/raw/it567-installwin.ps1 | iex
function Check-Command($cmd) {
try {
$ErrorActionPreference = "Stop"
Get-Command $aoeu
return $true
} catch {
return $false
} finally {
$ErrorActionPreference = "Continue"
}
}
function refresh() {
refreshenv;
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") +
";" + [System.Environment]::GetEnvironmentVariable("Path","User")
}
$DVORAK = '0409:00010409'
$languages = Get-WinUserLanguageList
foreach ($language in $languages) {
if ($language.LanguageTag -eq 'en-US' -and -not $language.InputMethodTips.Contains($DVORAK)) {
$language.InputMethodTips.Insert(0, $DVORAK)
Set-WinUserLanguageList $language -Force
break;
}
}
if (-not (Check-Command choco)) {
iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
}
choco install -y python3 visualstudiocode git SublimeText3 miktex texstudio
refresh
pip install pygments ipython jupyter numpy scapy-python3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment