The Azure Code Samples are currently available in English
These samples demonstrate how to get started with Azure PowerShell to perform various operations on Azure Managed Disks for common scenarios. Each sample respresents a scenario that you want to implement using Azure PowerShell and Managed Disks.
- Install the latest version of Azure PowerShell
- A Microsoft Azure subscription. If you don't have a Microsoft Azure subscription you can get a FREE trial account here
- Create a Managed OS Disk from a specialized VHD file
- Create a Managed data Disk from a VHD file
- Create Managed Disks from a snapshot
- Create a virtual machine by attaching an existing Managed Disk as OS Disk
- Create Managed Disks from VHD file in another subscription
- Create Snapshots from VHD file in another subscription
- Copy a Managed snapshot to a GRS/RA-GRS Storage account for Disaster Recovery
- Golden image scenario - Create a Managed Image from a VHD file in a different subscription
- Start Windows PowerShell Integrated Scripting Environment (ISE) in Administrator Mode
- At this point, you can either:
- Create a new script and copy and paste a script from this repo into the new file: Click File > New
- Or download/clone this repo and open a script from this repo: Click File > Open
- Provide the appropriate values for each variable (e.g. "Subscription Name", "Storage Account Name", etc.). Note: The angled brackets should not be included in the values you provide.
- Run the script by pressing F5 or clicking the "Run Script" icon.