2016-07-22 70 views
-1

我刚才通过以下这篇文章 https://azure.microsoft.com/en-us/documentation/articles/powershell-install-configure/的Windows Azure PowerShell的 - 安装错误

我看到下面的消息时,我打开PowerShell一起安装的Windows Azure PowerShell中,你知道如何解决这一问题:

cd : Cannot find path 'C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\' because it does not 
exist. 
At line:1 char:1 
+ cd 'C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\'; Impo ... 
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    + CategoryInfo   : ObjectNotFound: (C:\Program File...werShell\Azure\:String) [Set-Location], ItemNotFoundE 
    xception 
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLocationCommand 

Import-Module : The specified module '.\Azure.psd1' was not loaded because no valid module file was found in any 
module directory. 
At line:1 char:77 
+ cd 'C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\'; Impo ... 
+                    ~~~~ 
    + CategoryInfo   : ResourceUnavailable: (.\Azure.psd1:String) [Import-Module], FileNotFoundException 
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand 

Get-Content : Cannot find path 'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Azure\welcome.txt' 
because it does not exist. 
At line:1 char:105 
+ ... .\Azure.psd1; Get-Content .\welcome.txt; $VerbosePreference="Continue"; cd 'C:\ ... 
+     ~~~~~~~~~~~~~~~~~~~~~~~~~ 
    + CategoryInfo   : ObjectNotFound: (C:\ProgramData\...ure\welcome.txt:String) [Get-Content], ItemNotFoundEx 
    ception 
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand 

PS C:\> 

我使用Windows Server 2008 R2 Enterprise SP1。 我通过WebPI安装了Windows Azure Powershell。

您是否知道在安装过程中未创建文件夹“C:\ Program Files(x86)\ Microsoft SDKs \ Windows Azure \ PowerShell \ Azure”?

+0

什么是您的操作系统,版本和服务包版本(如果有)? – juvchan

+0

在您引用的文档中,还有两个用于安装Azure PowerShell的选项。您是从WebPI安装Azure PowerShell还是从PowerShell Gallery安装Azure PowerShell? – juvchan

+0

我使用Windows Server 2008 R2企业版SP1。我通过WebPI安装了Windows Azure Powershell –

回答

0

我有同样的问题,你必须作为管理员身份运行。

第二次点击PowerShell,并点击以管理员身份运行。

+0

我以管理员身份运行,但仍然看到相同的错误。我想知道为什么在安装过程中不会创建文件夹“C:\ Program Files(x86)\ Microsoft SDKs \ Windows Azure \ PowerShell \ Azure \”。 –