LibraryPrompt.ps1
############################################################################## ## ## From Windows PowerShell Cookbook (O'Reilly) ## by Lee Holmes (http://www.leeholmes.com/guide) ## ############################################################################## Set-StrictMode -Version 3 function Prompt { $id = 1 $historyItem = Get-History -Count 1 if($historyItem) { $id = $historyItem.Id + 1 } Write-Host -ForegroundColor DarkGray "`n[$(Get-Location)]" Write-Host -NoNewLine "PS:$id > " $host.UI.RawUI.WindowTitle = "$(Get-Location)" "`b" } |