My workflow for configuring my PowerShell environment.
- Windows Terminal (admin & user accounts)
- WinGet
$progressPreference = 'silentlyContinue'
Write-Information "Downloading WinGet and its dependencies..."
Invoke-WebRequest -Uri https://aka.ms/getwinget -OutFile Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle
Invoke-WebRequest -Uri https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile Microsoft.VCLibs.x64.14.00.Desktop.appx
Invoke-WebRequest -Uri https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/Microsoft.UI.Xaml.2.8.x64.appx -OutFile Microsoft.UI.Xaml.2.8.x64.appx
Add-AppxPackage Microsoft.VCLibs.x64.14.00.Desktop.appx
Add-AppxPackage Microsoft.UI.Xaml.2.8.x64.appx
Add-AppxPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle
- PowerShell 7 (admin & user accounts)
- Oh-My-Posh (admin & user accounts)
Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://ohmyposh.dev/install.ps1'))
- Create
C:\HOMEdirectory - Download and install FieraNerdFont
- Configure PowerShell Profile
3.1
notepad $profile; if not presentNew-Item -Path $profile -Type File -Force
$env:Path += ";C:\Users\user\AppData\Local\Programs\oh-my-posh\bin;C:\HOME\sysinternals"
oh-my-posh init pwsh --config "C:\Users\$($env:username)\AppData\Local\Programs\oh-my-posh\themes\catppuccin_macchiato.omp.json" | Invoke-Expression
Set-Location c:\home
function home {cls && pushd "c:\home"}
function profile {notepad $PROFILE && $PROFILE}
- Copy SysInternals to
C:\HOME - Add
HOMEasC:\HOMEin System Environment Variables - Configure PowerShell Terminal to use
FieraNerdFont - Download syntax files for Nano
- Copy syntax files to
C:\Program Files\Git\usr\share\nano - Create Symbolix links to useful folders under
C:\home
New-Item -ItemType Directory -Path c:\pwsh
New-Item -ItemType SymbolicLink -Target c:\pwsh -Path c:\home\pwsh
New-Item -ItemType Directory -Path c:\pwsh
New-Item -ItemType SymbolicLink -Target c:\git -Path c:\home\git
- Install RSAT
Get-WindowsCapability -Name RSAT* -Online | Add-WindowsCapability -Online
- Configure Termianl as default console & automatically launch PowerShell 7
- PSReadLine
- PSWriteHTML
- GPOZaurr