Get-AzureHDInsightCluster 報 ForbiddenError,提示憑證驗證失敗。Get-AzureRmHDInsightCluster 報 InvalidResourceNamespace,命名空間 Microsoft.HDInsight 無效。Azure中國區訂閱的發佈設置文件(.publishsettings)與本地訂閱狀態不同步,導致舊憑證失效;ARM模式下資源提供者未註冊或模塊版本不匹配。
Get-AzurePublishSettingsFile(瀏覽器打開下載鏈接)。Remove-AzureSubscription -SubscriptionName "YourSub" -Force。Import-AzurePublishSettingsFile "path\to\file.publishsettings"。Register-AzureRmResourceProvider -ProviderNamespace Microsoft.HDInsight。重新執行 Get-AzureHDInsightCluster 或 Get-AzureRmHDInsightCluster 應正常返回集群列表。
注:操作前確認已 Select-AzureSubscription 選中正確訂閱。