为什么没有“Set-Item"?在 Windows 7 PowerShell 上工作? [英] Why doesn't "Set-Item" work on Windows 7 PowerShell?

查看:27
本文介绍了为什么没有“Set-Item"?在 Windows 7 PowerShell 上工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的 Raspberry Pi 2 上安装 Windows 10 IoT.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

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

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)

You need to use quotes rather than < > around the name of the device (minwinpc)

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

这篇关于为什么没有“Set-Item"?在 Windows 7 PowerShell 上工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆