简体   繁体   中英

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

I am trying to install Windows 10 IoT on my Raspberry Pi 2. The PowerShell documentation tells me to put in this:

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

However, when I put it into my Windows 7 PowerShell, this comes out:

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

How do I fix this?

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM