Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Variables
- $storageaccount = 'mystorageaccount'
- $vhdpath = 'c:\users\darrenjrobinson\vhds\WindowsVM.vhd'
- $BlobName = 'WindowsVM.vhd'
- # Login
- Login-AzureRMAccount
- Get-AzureRmStorageAccount | select storageaccountname
- # Get Storage Account
- $storageContainer = Get-AzureRmStorageAccount | where {$_.StorageAccountName -eq $storageaccount} | Get-AzureStorageContainer
- # Upload VHD
- $storageContainer | Set-AzureStorageBlobContent –File $vhdpath –Blob $BlobName -BlobType Page
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement