1

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

Aaron Lamb
  • 83
  • 2
  • 7

1 Answers1

2

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:

  • Invoke your program via the shortcut,
  • then open the system menu (click on the icon in the top-left corner of the window),
  • select Properties
  • and modify the properties, notably the colors via the Colors tab.

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

  • In the Start Menu:

    • Right-click on the application of interest, then select More > Open file location.
  • In the taskbar:

    • Right-click on the application of interest, then right-click the application name and select Properties.
    • Activate the General tab
    • Copy the value of the Location: field - the folder in which the *.lnk file is located - to the clipboard.
    • Open File Explorer and paste the location into its address bar, which should open the folder in which the *.lnk file of interest is located.

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

  • Make a note of:

    • its exact filename (typically: Windows PowerShell)
    • its target command line, by right-clicking the file, selecting Properties, selecting the Shortcut tab and copying the value of the Target: field.
    • its startup directory, as noted in the Start in: field.
  • Delete the *.lnk file.

  • Recreate it with the previously noted target command line:

    • Right-click in an empty part of the File Explorer window and select New > Shortcut
    • Paste the command line and click Next.
    • Specify the previous filename, and click on Finish.
    • Right-click on the new file, select Properties, and paste the startup directory into field Start in:, then click OK.
  • Drag the new *.lnk file into the Start Menu and/or taskbar, as needed.

mklement0
  • 382,024
  • 64
  • 607
  • 775