为什么 "Set-Item" 不能在 Windows 7 PowerShell 上运行?

Why doesn't "Set-Item" work on Windows 7 PowerShell?

我正在尝试在我的 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

我该如何解决这个问题?

您需要在设备名称 (minwinpc) 周围使用引号而不是 < >

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