Skip to content

Instantly share code, notes, and snippets.

@Joren-Thijs
Last active July 3, 2023 09:36
Show Gist options
  • Save Joren-Thijs/4ee7593ed3126eceeb2115d03934cccd to your computer and use it in GitHub Desktop.
Save Joren-Thijs/4ee7593ed3126eceeb2115d03934cccd to your computer and use it in GitHub Desktop.
Powershell profile
# Import modules
Import-Module posh-git
Import-Module oh-my-posh
Import-Module -Name Terminal-Icons
Import-Module PSReadLine
Set-PoshPrompt -Theme 'robbyrussel'
Set-PSReadLineOption -PredictionSource History
Set-PSReadLineOption -PredictionViewStyle ListView
Set-PSReadLineOption -EditMode Windows
# Setup functions and aliases:
# Function to open powershell as Admin:
function Open-Admin { Start-Process -Verb RunAs (Get-Process -Id $PID).Path }
# Alias for the function:
Set-Alias su Open-Admin
Clear-Host
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment