0

Azure Powershell を使って楽しい一日を過ごしました。

多くの努力の結果、いくつかのコマンドレットが機能するようになりました。たとえば、Get-AzureSubscription -Current はサブスクリプションの詳細を返します。

これが関連しているかどうかはわかりませんが、返される詳細の 1 つは空の CurrentStorageAccountName です。それが Get-AzureStorageAccount コマンドレットのターゲットと同じかどうかはわかりません。

Get-AzureStorageAccount は、次の内容を逐語的に返します。

Get-AzureStorageAccount : 要求の送信中にエラーが発生しました。行:1 文字:1 + Get-AzureStorageAccount -StorageAccountName "mensch" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Get-AzureStorageAccount], HttpRequestException + FullyQualifiedErrorId : System.Net.Http.HttpRequestException,Microsoft.WindowsAzure.Commands .ServiceManagement.S torageServices.GetAzureStorageAccountCommand

以前に Set-AzureSubscription コマンドレットを実行したときは成功したと思いましたが、どちらの方法でもメッセージは表示されません。しかし、証明書をアップロードし、関連する拇印を使用してそのコマンドを実行したところ、途方に暮れたと思いました。

Get-AzureStorageAccount が機能しない理由はありますか?

4

3 に答える 3

0
I am not sure of the exact sequence of steps you have followed so listing the steps that I followed on a clean environment
// Get the subscription file. This should open a browser and give you an option to download the settings file
PS C:\> Get-AzurePublishSettingsFile

// Import the file that was downloaded
PS C:\> Import-AzurePublishSettingsFile  C:\Temp\settings.publishsettings


PS C:\> Get-AzureSubscription -Current
SubscriptionName                         : <snip>
SubscriptionId                           : <snip>
ServiceEndpoint                          : https://management.core.windows.net/
ResourceManagerEndpoint                  :
GalleryEndpoint                          :
ActiveDirectoryEndpoint                  :
ActiveDirectoryTenantId                  :
ActiveDirectoryServiceEndpointResourceId :
SqlDatabaseDnsSuffix                     : <snip>
IsDefault                                : True
Certificate                              : <snip>
CurrentStorageAccountName                :
ActiveDirectoryUserId                    :
TokenProvider                            : <snip>


// This retrieves the storage account  detils
PS C:\> Get-AzureStorageAccount
VERBOSE: 11:28:12 PM - Begin Operation: Get-AzureStorageAccount
VERBOSE: 11:28:13 PM - Completed Operation: Get-AzureStorageAccount


StorageAccountDescription :
AffinityGroup             :
Location                  : West US
GeoReplicationEnabled     : True
GeoPrimaryLocation        : West US
GeoSecondaryLocation      : East US
Label                     : <snip>
StorageAccountStatus      : Created
StatusOfPrimary           : Available
StatusOfSecondary         : Available
Endpoints                 : <snip>
StorageAccountName        : <snip>
OperationDescription      : Get-AzureStorageAccount
OperationId               : <snip>
OperationStatus           : Succeeded

手順をリストしたブログに出くわしました http://blogs.msdn.com/b/umits/archive/2012/11/16/manage-your-windows-azure-with-powershell.aspx

于 2014-07-01T23:34:30.997 に答える