Skip to content

Instantly share code, notes, and snippets.

@aclk
Forked from maddindeiss/WinSetup.ps1
Created July 15, 2021 03:27
Show Gist options
  • Save aclk/ae4bc2c4a2820528eacdfbebda6ff876 to your computer and use it in GitHub Desktop.
Save aclk/ae4bc2c4a2820528eacdfbebda6ff876 to your computer and use it in GitHub Desktop.
set-executionpolicy remotesigned -scope currentuser
$key = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced'
Set-ItemProperty $key Hidden 1
Set-ItemProperty $key HideFileExt 0
Set-ItemProperty $key ShowSuperHidden 0
## Install DotNetCore SDK
$dotnetInstallFilename = 'dotnet-install.ps1'
If(!(test-path $dotnetInstallFilename))
{
Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1' -OutFile $dotnetInstallFilename
./dotnet-install.ps1 -Channel LTS
$AddedLocation = "$env:LocalAppData\Microsoft\dotnet"
$Reg = "Registry::HKLM\System\CurrentControlSet\Control\Session Manager\Environment"
$OldPath = (Get-ItemProperty -Path "$Reg" -Name PATH).Path
$NewPath= $OldPath + ’;’ + $AddedLocation
Set-ItemProperty -Path "$Reg" -Name PATH –Value $NewPath
}
##
## Install PowershellCore
$powershellCoreDownloadLink = 'https://github.com/PowerShell/PowerShell/releases/download/v7.0.0-rc.1/PowerShell-7.0.0-rc.1-win-x64.msix'
$powershellCoreFilename = 'PowerShell-7.0.0-rc.1-win-x64.msix'
If(!(test-path $powershellCoreFilename))
{
Invoke-WebRequest $powershellCoreDownloadLink -OutFile $powershellCoreFilename
Add-AppxPackage $powershellCoreFilename
}
##
## Enable WSL and install Ubuntu
Enable-WindowsOptionalFeature -Online -NoRestart -FeatureName Microsoft-Windows-Subsystem-Linux
$distroFilename = 'Ubuntu.appx'
If(!(test-path $distroFilename))
{
Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1804 -OutFile $distroFilename -UseBasicParsing
Add-AppxPackage .\Ubuntu.appx
}
##
## Install Scoop and Setup
$scoopeFolder = 'c:\apps'
If(!(test-path $scoopeFolder))
{
New-Item -ItemType directory -Path $scoopeFolder
}
If(!(Get-Command "scoop"))
{
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
$env:SCOOP_GLOBAL = $scoopeFolder
[environment]::setEnvironmentVariable('SCOOP_GLOBAL',$env:SCOOP_GLOBAL,'User')
$env:SCOOP = $scoopeFolder
[environment]::setEnvironmentVariable('SCOOP',$env:SCOOP,'User')
}
##
## Install / Setup Git
scoop install git
git config --global core.eol lf
git config --global core.autocrlf input
git config --global core.symlinks true
##
## Add Buckets to Scoop
scoop bucket add extras
scoop bucket add nerd-fonts
scoop bucket add JetBrains
##
## Install Packages
scoop install vcredist
scoop install curl
scoop install windows-terminal
scoop install telegram
scoop install slack
# scoop install enpass
scoop install googlechrome
scoop install vlc
scoop install 7zip
scoop install steam
scoop install postman
scoop install robo3t
scoop install heidisql
scoop install filezilla
# scoop install docker
scoop install gitkraken
scoop install posh-git
scoop install vscode
scoop install jetbrains-toolbox
scoop install nodejs
scoop install python
scoop install Cascadia-Code
scoop install Cascadia-Mono
scoop install SourceCodePro-NF
scoop install Open-Sans
scoop install Raleway
scoop install Arimo-NF
##
Add-PoshGitToProfile -AllHosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment