我已經下載的第一行用「AzureManagementToolsSnapin」下面一個腳本: 添加-PSSnapin AzureManagementToolsSnapinPowerShell管理單元「AzureManagementToolsSnapin」未安裝此計算機
我閱讀一些博客和下載從下面的鏈接的Azure Powershell CMDLets: http://wappowershell.codeplex.com/releases/view/84058
當我試圖安裝每個給定的文檔下面的鏈接我無法安裝。然而,它記錄下面,我完全不明白爲什麼錯誤:
安裝裝配 'C:\ WindowsAzure \ WAPPSCmdletsBin \發佈\ Microsoft.WindowsAzure.Samples.ManagementTools.Powershell.dll'。 受影響的參數是:i = assemblypath = C:\ WindowsAzure \ WAPPSCmdletsBin \釋放\ Microsoft.WindowsAzure.Samples.ManagementTools.Powershell.dll 日誌= C:\ WindowsAzure \ WAPPSCmdletsBin \釋放\ Microsoft.WindowsAzure.Samples.ManagementTools .Powershell.InstallLog logtoconsole =嘗試在 C:\ WindowsAzure \ WAPPSCmdletsBin \ release \ Microsoft.WindowsAzure.Samples.ManagementTools.Powershell.dll程序集中找到 安裝程序時發生異常。 System.Reflection.ReflectionTypeLoadException:無法加載 一個或多個請求的類型。檢索LoaderExceptions 屬性以獲取更多信息。終止安裝 C:\ WindowsAzure \ WAPPSCmdletsBin \ release \ Microsoft.WindowsAzure.Samples.ManagementTools.Powershell.dll。 回滾程序集 'C:\ WindowsAzure \ WAPPSCmdletsBin \ release \ Microsoft.WindowsAzure.Samples.ManagementTools.Powershell.dll'。 受影響的參數是:i = assemblypath = C:\ WindowsAzure \ WAPPSCmdletsBin \釋放\ Microsoft.WindowsAzure.Samples.ManagementTools.Powershell.dll 日誌= C:\ WindowsAzure \ WAPPSCmdletsBin \釋放\ Microsoft.WindowsAzure.Samples.ManagementTools .Powershell.InstallLog logtoconsole =嘗試在 C:\ WindowsAzure \ WAPPSCmdletsBin \ release \ Microsoft.WindowsAzure.Samples.ManagementTools.Powershell.dll程序集中找到 安裝程序時發生異常。 System.Reflection.ReflectionTypeLoadException:無法加載 一個或多個請求的類型。檢索LoaderExceptions 屬性以獲取更多信息。終止安裝 C:\ WindowsAzure \ WAPPSCmdletsBin \ release \ Microsoft.WindowsAzure.Samples.ManagementTools.Powershell.dll。
請問,有人可以幫助我瞭解我失蹤了什麼。我也嘗試從下面下載: http://www.windowsazure.com/en-us/downloads/
但是,我下載的腳本上的很多功能似乎並不存在於Windows Azure PowerShell中。
PowerShell的代碼片段看起來像下面,不知道它的過時:
Add-PSSnapin AzureManagementToolsSnapIn
#bla bla
Get-HostedServices -SubscriptionId $sub -Certificate $cert|Select ServiceName|
foreach {
#Logic here
$service = $_.ServiceName
write-host $service
$deployId = (Get-HostedService $service -SubscriptionId $sub -Certificate $cert | Get-Deployment Staging).DeploymentId
Get-DiagnosticAwareRoles -StorageAccountName $storage -StorageAccountKey $key -DeploymentId $deployId |
foreach {
#DO stuff here
}
}
}
感謝。
請參閱上面更新的powershell片段。不確定它是否過時。 – 2013-05-02 12:47:38
@Myagdi - 看我的編輯 – alroc 2013-05-02 13:17:55