< Back

Export-AzureRMDisktoStorageAccount

Tue Jan 14, 2020 12:36 am

NAME Export-AzureRMDisktoStorageAccount



SYNOPSIS

Export Azure Managed disk to storage account.





SYNTAX

Export-AzureRMDisktoStorageAccount -StorageAccountName <Object> -StorageAccountRG <Object> -DiskName <Object>

-DiskRG <Object> [<CommonParameters>]



Export-AzureRMDisktoStorageAccount -StorageAccountName <Object> -StorageAccountRG <Object> -DiskName <Object>

-MDSASuri <Object> [<CommonParameters>]





DESCRIPTION

This cmdlet will export a managed disk within your subscription or a managed disk you have a SAS token for to a

storage account within your subscription.





PARAMETERS

-StorageAccountName <Object>

The name of the storage account to export managed disk to. Required



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-StorageAccountRG <Object>

The name of Resource group where storage account is. Required



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DiskName <Object>

The name of the managed disk you want to export. If you are exporting using a SAS token this is still

required. Required



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DiskRG <Object>

The name of Resource group where the managed disk you want to export is. This is required if you are exporting

a managed disk within your subscription.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-MDSASuri <Object>

SAS token for the managed disk you want to export. This is required if you are exporting a managed disk using

a SAS token.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES





Author : Hannel Hazeley - hhazeley@outlook.com



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>$sasuri = "https://md-jtvc3rvr31p0.blob.core.windo ... 71d9d60-1d

03-4595-ba14-8da2c339c284&sig=gJu8lmkp1JqOnp8pZgKoHa4rrOPCn%2B0Pnr8QdCUCM3M%3D"



Export-AzureRMDisktoStorageAccount -StorageAccountName storagedemostr1 -StorageAccountRG StorageDemo -DiskName

testdisk1 -MDSASuri $sasuri



This will export managed disk using SAS token into storage account within your subscription.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Export-AzureRMDisktoStorageAccount -StorageAccountName storagedemostr1 -StorageAccountRG StorageDemo

-DiskName testdisk1 -DiskRG StorageDemo



This will export managed disk within your subscription into storage account within your subscription.











RELATED LINKS

https://github.com/hhazeley/HannelsTool ... ccount.ps1