Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. # Variables
  2. $storageaccount = 'mystorageaccount'
  3. $vhdpath = 'c:\users\darrenjrobinson\vhds\WindowsVM.vhd'
  4. $BlobName = 'WindowsVM.vhd'
  5.  
  6. # Login
  7. Login-AzureRMAccount
  8. Get-AzureRmStorageAccount | select storageaccountname
  9.  
  10. # Get Storage Account
  11. $storageContainer = Get-AzureRmStorageAccount | where {$_.StorageAccountName -eq $storageaccount} | Get-AzureStorageContainer
  12. # Upload VHD
  13. $storageContainer | Set-AzureStorageBlobContent –File $vhdpath –Blob $BlobName -BlobType Page
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement