2017-07-13 29 views
0

團隊,本地部署時發生錯誤 - Azure IOT遠程監控套件

我們正在從github嘗試此IOT遠程監控套件。我們試圖先在本地部署,而不是Azure的,所以我們遵循這裏提到https://github.com/Azure/azure-iot-remote-monitoring/blob/master/Docs/local-deployment.md

同樣的文件,我們遵循的先決條件在這裏https://github.com/Azure/azure-iot-remote-monitoring/blob/master/Docs/dev-setup.md

然後,我們來我開發的命令提示符(作爲管理員運行),但我們最終不得不錯誤:

Get-AzureEnvironment : The 'Get-AzureEnvironment' command was found in the module 'Azure', but the module could not be loaded. For more information, r 'Import-Module Azure'. At C:\Users\swagh\Downloads\azure-iot-remote-monitoring-master\azure-iot-re -monitoring-master\Common\Deployment\PrepareIoTSample.ps1:14 char:14 + if ((Get-AzureEnvironment AzureCloud) -eq $null) + ~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Get-AzureEnvironment:String) , CommandNotFoundException + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

Get-AzureRMEnvironment : The 'Get-AzureRMEnvironment' command was found in module 'AzureRM', but the module could not be loaded. For more information, run 'Import-Module AzureRM'.

模塊已成功導入,但不知道爲什麼它同時在本地建立SOLN失敗。試圖設置執行策略繞過,不受限制。也限制在當前用戶的範圍內,但不起作用。

我們已經用完了想法。任何人都可以幫忙嗎?

+0

請運行此命令以顯示azure powershell版本'Get-Module -ListAvailable -Name Azure -Refresh'? –

回答

0

根據您的錯誤消息,您似乎沒有正確安裝Azure PowerShell。

我們可以安裝下載Azure PowerShell here。下載azure-powershell.4.2.0.msi完成後,以管理員身份運行。

我們可以發現最新版本的Azure powershell here

enter image description here

我們可以在Azure中的PowerShell版本4.2.0運行此命令: enter image description here

+0

非常感謝您的及時回覆。我會嘗試這一個並回復你 –

+0

仍然收到相同的錯誤。我附上了截圖。你可以請進一步看看並提供建議嗎? –

+0

@SandeepWagh如何下載此msi文件並進行安裝?從這裏下載https://github.com/Azure/azure-powershell/releases/download/v4.2.0-July2017/azure-powershell.4.2.0.msi –

0

Azure error

對上述錯誤的截圖。

+0

請嘗試下載'azure-powershell.4.2.0.msi'文件,並通過UI安裝它。 –

+0

對不起。你在說什麼用戶界面? –

+0

下載該文件,然後安裝它,我在我的答案中添加鏈接,請檢查它。文件名是azure-power shell-4.2.0。您可以將該鏈接複製到您的瀏覽器然後下載它 –

相關問題