Skip to content

Instantly share code, notes, and snippets.

@thefrench77
Created February 18, 2016 18:27
Show Gist options
  • Select an option

  • Save thefrench77/5b0d7f76ab760c43d6a1 to your computer and use it in GitHub Desktop.

Select an option

Save thefrench77/5b0d7f76ab760c43d6a1 to your computer and use it in GitHub Desktop.
PowerShell profile
$env:Path = ".;$env:Path"
# Window title:
$host.ui.RawUI.WindowTitle=[Environment]::UserDomainName + "\" + [Environment]::UserName + "@" + [Environment]::MachineName
# Persistent history:
$HistoryFilePath = Join-Path ([Environment]::GetFolderPath('UserProfile')) .ps_history
Register-EngineEvent PowerShell.Exiting -Action { Get-History | Export-Clixml $HistoryFilePath } | out-null
if (Test-path $HistoryFilePath) { Import-Clixml $HistoryFilePath | Add-History }
Set-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment