Powershell windows server 2012 .Path 安装 Hortonworks 数据平台 (HDP) 时出错

Posted

技术标签:

【中文标题】Powershell windows server 2012 .Path 安装 Hortonworks 数据平台 (HDP) 时出错【英文标题】:Powershell windows server 2012 .Path Error installing Hortonworks Data Platform (HDP) 【发布时间】:2014-09-10 13:16:31 【问题描述】:

我正在尝试在 windows server 2012 环境中安装 Hadoop for Windows (Hortonworks Data Platform 2.0),并创建下一个 powershell 命令

$currentPath = (Get-ItemProperty -Path $key -name) .Path + ';'

我收到此错误

At line:1 char:52
+$currentPath = (Get-ItemProperty -Path $key -name) .Path + ';'
+
Unexpected toke '.Path' in expression or statement
   + CategoryInfo          : ParserError:(:) [], ParentContainsErrorRecordException
   + FullyQualifiedErrorID : UnexpectedToken

我做错了什么,请记住,我要查看 Horton Works 的官方文档

http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.1-Win-latest/bk_installing_hdp_for_windows/content/win-softwareinstall-ps.html#win-cli-python

【问题讨论】:

【参考方案1】:

让我们看看,

首先,这里有一个空格).Path

其次,路径似乎不是该 cmdlet 返回的有效属性,因此即使您更正错误的空间,它仍然无法工作

第三,您指定参数-name而不提供值

【讨论】:

【参考方案2】:

经过一番研究,我能够解决这个错误。

这就是我想要做的事情,是使用 PowerShell 在 Windows Server 中安装 HDP 环境,由于我不太擅长,所以我犯了愚蠢的错误。

对于那些不太擅长使用 powershell 的人来说,有一种手动方式来安装 HDP 所需的环境,这要简单得多。

这是链接。

http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.1-Win-latest/bk_installing_hdp_for_windows/content/win-software-install-gui.html

我希望它不能节省更多时间。

【讨论】:

以上是关于Powershell windows server 2012 .Path 安装 Hortonworks 数据平台 (HDP) 时出错的主要内容,如果未能解决你的问题,请参考以下文章

powershell 在Windows Server上打开FireWall端口

Windows Nano Server安装配置详解09:Nano Powershell

powershell在远程windows server上登录并执行程序

powershell 这将获得Windows Server 2012 r2上的所有Windows功能及其状态

为啥安装sql Server 2008时总是显示windows powershell错误?

MCSA / Windows Server 2016 DISM和Powershell管理和维护镜像