how to copy vhd to RM based subscription using powershell?

有些话、适合烂在心里 提交于 2019-12-02 04:44:23

问题


I am looking for Powershell script to copy vhd to subscription using Resource Manager deployment model.


回答1:


vhd's are stored in Azure storage page blobs, and the storage API works independently of how an account is created (classic vs ARM). It's even independent of subscription. You just need your storage account's name and key.

So you should just be able to copy via something like:

$DestContext = New-AzureStorageContext -StorageAccountName "<name>"
   -StorageAccountKey "<key>"

Start-AzureStorageBlobCopy -DestContainer "<containername>" -DestContext $DestContext

And Start-AzureStorageBlobCopy should work the same, regardless how the storage account was created.



来源:https://stackoverflow.com/questions/35298438/how-to-copy-vhd-to-rm-based-subscription-using-powershell

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!