2016-05-22 8 views
1

パワーシェルを使用して、Azureストレージアカウントで作成されるファイル共有数をファイルに書きたいとします。すべてのストレージアカウントは新しいリソースマネージャモードになっています。powershellを使用してAzure Storageアカウントのファイル共有数を調べる方法ARM

おかげ アミット

+0

PowerShell Cmdletを使用して作成されたストレージアカウント内のファイル共有の数はいくつありますか? –

+0

件数やその他の有用な詳細などのファイル共有に関する詳細を探していました...... – Amit

答えて

3

PowerShellスクリプトは、以下のあなたのために働く必要があります。

$ctx = New-AzureStorageContext -StorageAccountName <storage-account-name> -StorageAccountKey <storage-account-key> 
(Get-AzureStorageShare -Context $ctx).count 
+0

ありがとうございました.... – Amit

+0

今後のPowerShellのサンプル/質問については、https: //msdn.microsoft.com/library/azure/dn806401.aspxおよびhttps://github.com/Azure-Samples/storage-powershell-getting-started/blob/master/AzureFiles.ps1 –

関連する問題