为什么“Set-Item”不适用于Windows 7 PowerShell?

时间:2015-06-19 02:20:24

标签: windows powershell raspberry-pi

我正在尝试在我的Raspberry Pi 2上安装Windows 10 IoT.PowerShell文档告诉我输入:

Set-Item WSMan:\localhost\Client\TrustedHosts -Value <minwinpc>

然而,当我把它放入我的Windows 7 PowerShell时,这个出现了:

At line:1 char:54
+ Set-Item WSMan:\localhost\Client\TrustedHosts -Value <minwinpc>
+                                                      ~
The '<' operator is reserved for future use.
+ CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : RedirectionNotSupported

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:2)

您需要使用引号而不是&lt; &GT;围绕设备名称(minwinpc)

Set-Item WSMan:\localhost\Client\TrustedHosts -Value 'minwinpc'