# Powershell: Custom prompt using oh-my-posh


1. Install a nerd font from [https://www.nerdfonts.com/font-downloads](https://www.nerdfonts.com/font-downloads)
2. Install oh-my-posh using winget

```powershell
winget install oh-my-posh

// Close & reopen powershell window

// Check oh-my-posh version
oh-my-posh version

// Upgrade oh-my-posh using winget
winget upgrade oh-my-posh
```

1. Install Terminal-Icons and import them for displaying.

```powershell

// Open the current user profile:
code $PROFILE

// Add the following lines to the profile file:
Install-Module -Name Terminal-Icons -Repository PSGallery -Scope CurrentUser

Import-Module -Name Terminal-Icons
```

This will install Terminal-Icons and import them for displaying common icons with the PowerShell terminal.

1. Initialize oh-my-posh with a theme i.e. amro in this case.

```powershell
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\amro.omp.json" | Invoke-Expression
```

Themes are available at: [https://ohmyposh.dev/docs/themes](https://ohmyposh.dev/docs/themes)

