Change PowerShell Font when "run as administrator"

Brian C 0 Reputation points
2024-02-15T23:39:51.4333333+00:00

Hey,I tried to change the font of the powershell and it was easy. However, every time I let it "run as administrator", it will use the system default font and will be reset even I change it (doesn't affect normal run- not admin). I looked online and found this post while I don't know where is the answer. https://answers.microsoft.com/en-us/windows/forum/all/change-the-powershell-default-font/671782a0-4748-45b4-9917-1255b9f9af71 Thanks,

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Vahid Ghafarpour 23,385 Reputation points Volunteer Moderator
    2024-02-17T06:10:03.2266667+00:00

    Thanks for posting your question in the Microsoft Q&A forum.
    Run this command in a PowerShell window (run as administrator).

    Set-ItemProperty -Path "HKCU:\Console" -Name "FaceName" -Value "YourDesiredFontName" 
    

    I hope after that it will be fixed.

    ** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful **


  2. Tu D 0 Reputation points
    2024-10-29T17:15:58.9633333+00:00

    Hi, It might be late but I found out how to do it by right click the toolbar -> Properties -> Font.

    0 comments No comments

  3. Rich Matheisen 47,901 Reputation points
    2024-10-29T18:56:47.8466667+00:00

    You can use this module to change the console font: https://www.powershellgallery.com/packages/WindowsConsoleFonts/1.1.0

    To check if you're running as administrator:

    $currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
    $currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
    

    Put that into your PowerShell profile. Change the font accordingly.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.