User Tools

Site Tools


powershell_setup

PowerShell Setup

  1. Run Get-PSRepository to verify if PowerShell Gallery is set up properly. If it isn't, you probably need to set up the web proxy settings.
  2. If https://www.powershellgallery.com/api/v2 is untrusted, run this Set-PSRepository -Name PSGallery -InstallationPolicy Trusted.
  3. Run Find-Module BurntToast to 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).

Install Stuff

  1. Run Install-Module -Name BurntToast -Repository PSGallery.
  2. Run Install-Module -Name Terminal-Icons -Repository PSGallery.
  3. Run Install-Module posh-git -Scope CurrentUser.

Older stuff that probably doesn't need to be installed anymore.

  1. Run winget install JanDeDobbeleer.OhMyPosh -s winget.

Setup Profile

  1. Find your profile: $PROFILE | Format-List -Force
  2. Test if it exists: Test-Path $profile
  3. Create if it doesn't exist: New-Item -path $profile -type file –force
  4. Edit it: code $profile
  5. 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 whatever to 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.txt · Last modified: 2023/01/28 00:04 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki