powershell_setup
This is an old revision of the document!
Table of Contents
PowerShell Setup
Install Stuff
- Run
Get-PSRepositoryto verify if PowerShell Gallery is set up properly. If it isn't, you probably need to set up the web proxy settings. - Run
Find-Module posh-gitto verify that modules can be installed. If you get 'Unable to resolve package source…' you will need to install it manually (don't bother trying to fix it). - Run
Install-Module posh-git -Scope CurrentUser. - Run
winget install JanDeDobbeleer.OhMyPosh -s winget. - Run
Install-Module -Name Terminal-Icons -Repository PSGallery.
Setup Profile
- Find your profile:
$PROFILE | Format-List -Force - Test if it exists:
Test-Path $profile - Create if it doesn't exist:
New-Item -path $profile -type file –force - Edit it:
code $profile - Put just this in it:
. 'D:\Bin\Manuka\General Scripts\PowerShell startup.ps1'
Picking a Theme
Current favorites: pure (minimalist) or iterm2.
- Open Windows Terminal.
- Spit it with two PowerShell terminals.
- In both, switch to an interesting directory, e.g.
cd C:\Dev\Common\Auto Hot Key\ - In one terminal, type
Get-PoshThemes. - In the other, type
Set-PoshPrompt -Theme whateverto play with it.
Screw it, use my own
Run this:
oh-my-posh init pwsh --config 'D:\Bin\Common\Settings\Oh-my-posh themes\tallguy.omp.json' | Invoke-Expression
powershell_setup.1671503223.txt.gz · Last modified: 2022/12/21 03:27 (external edit)
