powershellpowershell-v5.1

Powershell -command text not appearing


Windows 10, Powershell -v 5.1

I have tried to restore powershell to defaults, both normally and as admin. I have changed/turned off high contrast settings, deleted console files for powershell in Regedit, as well as tried to restore defaults from command line scripts.

Have tried restarting after applying all of this, but much of my output text is invisible, as well as commands with only one "-" dash, but commands with "--" appear.

See in pics below

no - identifiers

Invisible "-i"

Reappearing "--i"

Invisible Surge Data


Solution

  • It sounds like you've persistently modified the console-window colors in a manner that renders certain syntactic elements invisible.
    You can either modify your console-window settings interactively - which may be nontrivial - or you can try to restore the original colors by recreating the shortcut files that start your console windows:

    Shortcut files (*.lnk files) contain their own console-window settings, which are independent of the defaults defined for console windows in the [HKEY_CURRENT_USER\Console] registry key and its subkeys named for specific executable names / window titles.

    Therefore, even if you remove [HKEY_CURRENT_USER\Console] or specific subkeys, starting a program via a shortcut file will still apply the settings stored inside that shortcut file.

    To bypass the shortcut-file settings ad hoc, you can start your program directly, using the Run dialog: Press WinKey+R and enter powershell (for Windows PowerShell) or pwsh (for PowerShell Core), which applies only the registry defaults, if any.

    However, to solve that problem persistently, you must modify or recreate the shortcut file(s) you use to start your program:

    To modify the shortcut:

    To recreate the shortcut (instructions based on Windows 10):

    Once you've located the *.lnk file of interest: