Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (22 sloc) 690 Bytes
Format the prompt.
This prompt configuration displays the SesstionTitleName assinged in ConsoleTitle.ps1 and also adjusts the color
based on Test-Administrator.
Requires NameIt and posh-git Modules as well as the Test-Administrator funciton.
function global:prompt
Write-Host ''
if (Test-Administrator) {
Write-Host "[$SessionTitleName] " -NoNewline -ForegroundColor Yellow
} else {
Write-Host "[$SessionTitleName] " -NoNewline -ForegroundColor DarkGray
Write-Host ($pwd.ProviderPath) -ForegroundColor DarkGray -NoNewline
Write-Host "`n`rposh" -NoNewline
return "> "