我刚刚按照这篇文章安装了Windows Azure PowerShell https://azure.microsoft.com/en-us/documentation/articles/powershell-install-configure/
当我打开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 :(得分:0)
我有同样的问题,你必须以管理员身份运行。
再次单击powershell,然后单击以管理员身份运行。