Powershell GetValue returns gibberish

Why is this:

$RegistryKeys = (Get-ChildItem HKLM:\SYSTEM\CurrentControlSet\services\VMSMP\Parameters\NicList) foreach ($subKey in $RegistryKeys) {$subKey.GetValue("FriendlyName")} 

Return this (text surrounded by asterisks is gibberish):

  Corp ** j **
 LitwareInc Perimeter External ** 䑀 **
 LitwareInc Perimeter Internal ** 䑀 **
 LitwareInc Perimeter2 External
 LitwareInc Perimeter2 Internal
+4
source share
1 answer

This is not gibberish. These are multibyte Unicode characters that do not display properly in the cmd window.

See the second answer to this question for a solution.

+2
source

Source: https://habr.com/ru/post/1369073/


All Articles