處理 Azure 資產

Azure Cmdlet 允許你通過使用 C#程式碼或 Azure 門戶的 PowerShell 對 Azure 資產執行一些相同的操作。

例如,通過這些步驟,你可以將 Azure blob 的內容下載到本地目錄中:

New-Item -Path .\myblob -ItemType Directory
$context = New-AzureStorageContext -StorageAccountName MyAccountName -StorageAccountKey {key from the Azure portal}
$blob = Get-AzureStorageBlob -Container MyContainerName -Context $context
$blob | Get-AzureStorageBlobContent -Destination .\myblob\