Functions/Set-Prompt.ps1
Function Set-Prompt { <# .SYNOPSIS Describe the function here .DESCRIPTION Describe the function in more detail .EXAMPLE Give an example of how to use it #> # Determine Admin; set Symbol variable. IF ([bool](([System.Security.Principal.WindowsIdentity]::GetCurrent()).Groups -match 'S-1-5-32-544')) { $Symbol = '#' } Else { $Symbol = '$' } IF ((Get-Location).Path -eq $env:USERPROFILE) { $Path = '~' } Else { $Path = (Get-Location).Path } # Create prompt. "[$($env:USERNAME.ToLower())@$($env:COMPUTERNAME.ToLower()) $Path]$Symbol " } # End Function: prompt. |