Did you know that the PowerShell console can also output a special icon? All you have to do is set the console font to be a TrueType font, such as "Consolas".
To display special characters, use either decimal or hexadecimal character codes, such as:
or open the built-in application "Charactermap" on the system to select a symbol that you want to display on the console. The following example is the way to make the PowerShell console tip information more bizarre:
or open the built-in application "Charactermap" on the system to select a symbol that you want to display on the console. The following example is the way to make the PowerShell console tip information more bizarre:
function prompt
{
$specialChar 1 = [char]0x25ba
write-host ' PS '-nonewline
write-host $specialChar 1- Foregroundcolor green-nonewline
'
$host. Ui. Rawui.windowtitle = Get-location
}
Take the picture as the proof:
Note that the "prompts" function must return at least one character, otherwise the PowerShell console will print out the default message, which is understandable, otherwise who knows if the last command was executed? This is why the above function uses a space as the return value, and the write-host to suppress the symbols that need to be displayed.