Skip to content

Instantly share code, notes, and snippets.

@rootsec1
Created July 2, 2019 04:30
Show Gist options
  • Save rootsec1/9340befe0e87391f74e0ee70068e6cdd to your computer and use it in GitHub Desktop.
Save rootsec1/9340befe0e87391f74e0ee70068e6cdd to your computer and use it in GitHub Desktop.
My PowerShell $PROFILE. Use this to change your prompt.
function prompt
{
cd D:\Code
$currentDirectory = $(Get-Location)
$UncRoot = $currentDirectory.Drive.DisplayRoot
# Convert-Path needed for pure UNC-locations
write-host "This is W.L [$(Convert-Path $currentDirectory)>]" -ForegroundColor Yellow
Write-Host "λ" -NoNewline -ForegroundColor Blue
return " "
}
@rootsec1
Copy link
Author

rootsec1 commented Jul 2, 2019

Place it in C:\Users\<USERNAME>\Documents\WindowsPowerShell

Screenshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment