Created
January 6, 2023 02:54
-
-
Save AdamsGH/a15a12828d10d014b4589efcb1fa9c7d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Install Choco | |
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) | |
## Install latest Powershell version | |
winget install --id Microsoft.Powershell --source winget | |
# Install all packages from src file, one line = one package | |
$packages=(Get-Content .\packages.txt) | |
foreach ($pkg in $packages) | |
{ | |
choco install $pkg -y | |
} | |
# SSH Server | |
Get-Service -Name sshd | Set-Service -StartupType Automatic | |
Start-Service sshd | |
echo "Don't forget to ssh-add!" | |
# SSH Agent | |
Get-Service ssh-agent | Set-Service -StartupType Manual | |
Start-Service ssh-agent | |
Get-Service ssh-agent | |
# Enable WSL and switch to WSL2 | |
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart | |
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart | |
if (-Not (Test-Path -Path .\staging)) { $dir = mkdir .\staging } | |
curl.exe -L -o .\staging\wsl_update_x64.msi https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi | |
.\staging\wsl_update_x64.msi /quiet | |
wsl --set-default-version 2 | |
Remove-Item .\staging\wsl_update_x64.msi | |
# Install-Module -Scope CurrentUser Wsl -f | |
# curl.exe -L -o .\staging\install_wsl_distro.ps1 https://raw.githubusercontent.com/diddledani/one-script-wsl2-systemd/main/install.ps1 | |
# Invoke-Command -ScriptBlock ([scriptblock]::Create(((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/diddledani/one-script-wsl2-systemd/main/install.ps1')))) | |
# Install Scoop | |
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser | |
irm get.scoop.sh | iex | |
# trzsz, ssh file transfer | |
scoop bucket add extras | |
scoop install trzsz | |
# System info | |
scoop install neofetch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment