开发者

Powershell GetValue is returning gibberish

Why does this:

$RegistryKeys = (Get-ChildItem 
    HKLM:\SYSTEM\Curren开发者_如何学运维tControlSet\services\VMSMP\Parameters\NicList)

foreach ($subKey in $RegistryKeys) {$subKey.GetValue("FriendlyName")}

Return this (text surrounded by asterisks are gibberish characters):

Corp **j**
LitwareInc Perimeter External **䑀**
LitwareInc Perimeter Internal **䑀**
LitwareInc Perimeter2 External
LitwareInc Perimeter2 Internal


It's not gibberish. They're multi-byte Unicode characters, which don't display properly in a cmd window.

See the second answer to this question for a solution.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜