gpt4 book ai didi

.net - Powershell GetValue 返回乱码

转载 作者:行者123 更新时间:2023-12-04 21:53:58 25 4
gpt4 key购买 nike

为什么会这样:

$RegistryKeys = (Get-ChildItem 
HKLM:\SYSTEM\CurrentControlSet\services\VMSMP\Parameters\NicList)

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

返回这个(星号包围的文本是乱码):

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

最佳答案

这不是胡言乱语。它们是多字节 Unicode 字符,无法在 cmd 窗口中正确显示。

参见 this question 的第二个答案寻求解决方案。

关于.net - Powershell GetValue 返回乱码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7198753/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com