Johnermac
  • About me
  • Active Directory
    • PowerShell
      • Customize
      • Notes
      • ETW
      • AMSI Bypass
      • Obfuscation
    • Enumeration
      • Domain
      • GPO
      • ACL
      • Domain Trusts
      • Forest
      • Extra
      • BloodHound
      • BloodHound CE
  • Tunneling
    • Tools
      • Udp2Raw
      • Fraud Bridge
      • Chisel
      • SSF
      • Egress-Assess
      • Ligolo-ng
      • Sshutle
      • Rpivot
      • Tunna
      • reGeorg
      • Neo-reGeorg
      • PivotSuite
  • Post-Exploitation
    • Data Exfiltration
      • HTTP
        • Cancel
        • wget
        • bash
        • busybox
        • IRB
        • PHP
        • Ruby
      • ICMP
        • XXD
        • Ruby
        • Python
      • UDP
        • Netcat
      • TCP
        • Netcat
        • KSH
        • whois
        • Finger
      • HTTPS
        • Python
        • OpenSSL
  • BLOG
    • Articles
      • Pivoting for Red Teaming
Powered by GitBook
On this page
  • 1. Install Microsoft Terminal:
  • 2. Choose a theme:
  • 3. Install a Font:
  • 4. Install Oh My Posh
  • 5. Save the configs:
  • Results:
  1. Active Directory
  2. PowerShell

Customize

How to customize Powershell using Oh My Posh

PreviousPowerShellNextNotes

Last updated 1 year ago

1. Install Microsoft Terminal:

In Windows Terminal - Go to Settings → Appearance → Open JSON

2. Choose a theme:

Add the theme do the SCHEME in the JSON file

What I'm using:

"schemes": 
    [
        {
            "background": "#0C0C0C",
            "black": "#0C0C0C",
            "blue": "#62DA00",
            "brightBlack": "#767676",
            "brightBlue": "#3B78FF",
            "brightCyan": "#61D6D6",
            "brightGreen": "#16C60C",
            "brightPurple": "#B4009E",
            "brightRed": "#E74856",
            "brightWhite": "#F2F2F2",
            "brightYellow": "#F9F1A5",
            "cursorColor": "#FFFFFF",
            "cyan": "#3A96DD",
            "foreground": "#CCCCCC",
            "green": "#13A10E",
            "name": "Campbell",
            "purple": "#881798",
            "red": "#C50F1F",
            "selectionBackground": "#FFFFFF",
            "white": "#CCCCCC",
            "yellow": "#C19C00"
        },

We are going to use "OH MY POSH"

In order to do that, we need NERD Fonts.

3. Install a Font:

4. Install Oh My Posh

Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://ohmyposh.dev/install.ps1'))

Choose an Oh My Posh theme:

5. Save the configs:

In Windows Terminal - Go to Settings

  • oh-my-posh --init --shell pwsh --config ~/AppData/Local/Programs/oh-my-posh/themes/craver.omp.json | Invoke-Expression

The one in the example (craver), It's what I'm using currently

Maybe you need to "bypass" the ExecutionPolicy

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted

Results:

Appearance → Choose the new Theme ()

Appearance → Font → Choose the new Font ()

Type "notepad $PROFILE" in PowerShell → add the theme of Oh My Posh ()

from Step 2
from Step 3
from Step 4
Get Windows Terminal from the Microsoft StoreMicrosoftStore
Windows Terminal Themes
Logo
Windows | Oh My Posh
Logo
Nerd Fonts - Iconic font aggregator, glyphs/icons collection, & fonts patcherNerd Fonts
Themes | Oh My Posh
Logo
My costumized Powershell
Logo
Logo