Skip to content

Instantly share code, notes, and snippets.

@bigyank
Last active September 21, 2020 09:00
Show Gist options
  • Save bigyank/0fa9f75d57c6e8ea453ac45b847799c7 to your computer and use it in GitHub Desktop.
Save bigyank/0fa9f75d57c6e8ea453ac45b847799c7 to your computer and use it in GitHub Desktop.
script to get essential programs after fresh windows install
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit }
echo "starting"
$Packages = 'vscode',
'git',
'vscode-settingssync',
'7zip',
'anki',
'notepadplusplus',
'qbittorrent',
'potplayer',
'youtube-dl',
'ffmpeg',
'nodejs-lts',
'hackfont',
'sumatrapdf',
'discord',
'spotify',
'jdownloader',
'hyper'
function installPac {
ForEach ($PackageName in $Packages)
{
choco install $PackageName -y
}
}
If(Test-Path -Path "$env:ProgramData\Chocolatey") {
installPac
}
Else {
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
installPac
}
echo "sucessful"
Read-Host -Prompt "Press Enter to exit"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment