Skip to content

Instantly share code, notes, and snippets.

Last active May 18, 2022
What would you like to do?
basic system setup
$FontRelease = "2111.01"
$FontArchive = "CascadiaCode-${FontRelease}.zip"
wget.exe "$FontRelease/$FontArchive"
# -aoa = always overwrite
7z x -oCascadiaCode -aoa "${FontArchive}"
$fonts = (New-Object -ComObject Shell.Application).Namespace(0x14)
foreach ($file in Get-ChildItem CascadiaCode\ttf\*.ttf)
$fn = $file.Name
if (-not (Test-Path "C:\Windows\fonts\$fn")) {
Write-Host "$fn"
Get-Item $file | %{ $fonts.CopyHere($_.fullname) }
sudo Copy-Item CascadiaCode\ttf\*.ttf c:\Windows\fonts\
# install scoop
Set-ExecutionPolicy RemoteSigned -scope CurrentUser
# for bare metal
iwr -useb | iex
# or, for VM with a shared w:\ drive already
$env:SCOOP = 'w:\scoop'
[Environment]::SetEnvironmentVariable('SCOOP', $env:SCOOP, 'User')
iwr -outfile 'install.ps1'
.\install.ps1 -ScoopDir $env:SCOOP
# install some basics
winget install git.git
scoop bucket add rp-scoops
scoop bucket add extras
# common stuff
scoop install ninja debugviewpp cmake gh ripgrep sysinternals notepad3 nano wget 7zip sudo posh-git
# The alphanumeric ID is windows terminal
winget install 9N0DX20HK701
winget install Mozilla.Firefox
winget install vscode
sudo Add-MpPreference -ExclusionProcess oh-my-posh.exe
# see also
# run this in pwsh, not the same terminal as above
if (!(Test-Path -Path $PROFILE )) { New-Item -Type File -Path $PROFILE -Force }
oh-my-posh init pwsh | Invoke-Expression
Import-Module ((scoop prefix posh-git) + "\posh-git.psm1")
wget.exe "" ~/agnoster.omp.json
oh-my-posh init pwsh --config ~/agnoster.omp.json | Invoke-Expression
if (!Get-Content $PROFILE | Select-String -Pattern "oh-my-posh") {
Add-Content -Path $PROFILE -Value "oh-my-posh init pwsh --config ~/agnoster.omp.json | Invoke-Expression"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment