如何使用PowerShell的VHD复制到基于RM订阅? [英] how to copy vhd to RM based subscription using powershell?

查看:185
本文介绍了如何使用PowerShell的VHD复制到基于RM订阅?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要寻找PowerShell脚本复制VHD使用资源管理器的部署模型订阅。

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

推荐答案

VHD的存储在Azure存储页面斑点,存储API独立的帐户是如何创建的(经典VS ARM)的作品。它甚至独立认购。你只需要您的存储帐户名和密钥。

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

启动AzureStorageBlobCopy 应该工作一样,无论是存储帐户的创建方式。

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

这篇关于如何使用PowerShell的VHD复制到基于RM订阅?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆