2017-08-02 7 views
0

現在のストレージレプリケーション設定(LRS、GAGRS、GRS)を確認するスクリプトを取得しようとしていますが、Googleでは何も見つかりませんでした。AzureRMStorageレプリケーション設定を取得

(私は何かが欠けていない場合)であっても、私たち以下proertiesに「複製」の見出しを得ることはありませんが

は、設定を取得するが道であり、それは間違っへの道がある最終的ならばそれを修正する?

これらはすべてLRSに設定されていますが、一部はGRSに設定されています。あなたの助けのための

Login-AzurermAccount 
Select-AzureRmSubscription -SubscriptionId xxxxx-xxxxx-xxxxx-xxxxx 
Get-AzureRmStorageAccount -ResourceGroupName rg-name -Name storageaccountname 

ResourceGroupName  : rg-name 
StorageAccountName  : storageaccountname 
Id      : /subscriptions/xxxxx-xxxxx-xxxxx-xxxxx/resourceGroups/rg-name/providers/Microsoft.Sto 
         rage/storageAccounts/storageaccountname 
Location    : westeurope 
Sku     : Microsoft.Azure.Management.Storage.Models.Sku 
Kind     : Storage 
Encryption    : 
AccessTier    : 
CreationTime   : 23/03/2017 16:54:28 
CustomDomain   : 
Identity    : 
LastGeoFailoverTime : 
PrimaryEndpoints  : Microsoft.Azure.Management.Storage.Models.Endpoints 
PrimaryLocation  : westeurope 
ProvisioningState  : Succeeded 
SecondaryEndpoints  : 
SecondaryLocation  : 
StatusOfPrimary  : Available 
StatusOfSecondary  : 
Tags     : {[TAGS]} 
EnableHttpsTrafficOnly : False 
Context    : Microsoft.WindowsAzure.Commands.Common.Storage.LazyAzureStorageContext 
ExtendedProperties  : {} 

感謝:)

+0

この質問には答えはありません。 Azure Power Shellを使って解決することができます。私はそれを答えに加えます。それがより多くの人々を助けることを願っています。 –

+0

Azureの質問がある場合、タグ「Azure」 –

答えて

1

レプリケーション情報を一覧表示するGet-AzureRmStorageAccountを使用することができます。以下のようになります。

次のような結果が得られます。

PS C:\Users\v-shshui> $storage.Sku 

     Name  Tier 
     ----  ---- 
StandardLRS Standard 

レプリケーションを変更する場合は、Set-AzureRmStorageAccountを使用できます。例:

Set-AzureRmStorageAccount -ResourceGroupName "MyResourceGroup" -AccountName "MyStorageAccount" -Type "Standard_RAGRS" 
関連する問題