This is a PowerShell module that provides the capability to quickly create and restore snapshots to Azure Virtual Machines in the Azure Resource Manager version of Azure. This is a standard PowerShell module so detailed information about the cmdlets can be viewed with the Get-Help cmdlet. Examples and additional information can be seen using the -Examples, -Detailed and -Full switches on the Get-Help cmdlet.
- Copy the AzureSnap folder into the c:/Program Files/WindowsPowerShell/Modules directory.
- Open a fresh PowerShell Console and run
Import-Module AzureSnap
- Run the following command to see a list of available commands in the module
Get-Command -Module AzureSnap
- Run the help commands to learn more about the cmdlets; such as, what information is required and examples of how to run the cmdlets.
Get-Help Restore-AzureVMSnapshot -Full
Creates a new Snapshot based on of the OS disk of the specified VM. You may choose a name for the Snapshot or let the cmdlet generate a timestamped name. The snapshot will be created to match the same tier and location of the OS disk. This cmdlet only creates a snapshot of the OS disk, not data disks. However, all disks will be attached to the VM in the restore process.
Restores an Azure Virtual Machine's OS disk to a previously created snapshot. This process will handle removing the VM and re-creating it with the same data disk and network card configuration by reattaching the disks and NICs.