Created
January 20, 2010 17:16
-
-
Save mrcaron/282014 to your computer and use it in GitHub Desktop.
Powershell prompt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Powershell Prompt | |
| $global:CurrentUser = [System.Security.Principal.WindowsIdentity]::GetCurrent() | |
| function prompt | |
| { | |
| $un = [Regex]::Match($CurrentUser.Name,"SOLIDWORKS\\+(.*)").Groups[1].Value | |
| $hn = [Net.DNS]::GetHostName() | |
| $host.ui.rawui.WindowTitle = $un + "@" + $hn #+ " Line: " + $host.UI.RawUI.CursorPosition.Y | |
| Write-Host($un + "@" + $hn + " ") -foregroundcolor Green -nonewline; Write-Host ($(get-location)) -foregroundcolor Yellow | |
| Write-Host(">") -nonewline -foregroundcolor Green | |
| return " " | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment