< Back

Switch-AzureV2VMOSDisk

Tue Jan 14, 2020 12:38 am

NAME Switch-AzureV2VMOSDisk



SYNOPSIS

Backup and switch Virtual machine's OS disk





SYNTAX

Switch-AzureV2VMOSDisk [-SubscriptionId] <Object> [-rgName] <Object> [-vmName] <Object> [<CommonParameters>]





DESCRIPTION

This cmdlet will backup a virtual machine's Operating System disk.





PARAMETERS

-SubscriptionId <Object>

Subscription ID for the subscription that virtual machine is on. Required



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-rgName <Object>

The Resource Group the virtual machine belongs to. Required



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-vmName <Object>

The name of the virtual machine you need to create image from to be deleted. Required



Required? true

Position? 3

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:\\>Switch-AzureV2VMOSDisk -SubscriptionId 1d6737e7-4f6c-4e3c-8cd4-996b6f003d0e -rgName DVideoRG1 -vmName

DV1-DPBIMG-001



Creates a backup of the OS Disk of virtual machine and switch OS disk to newly created backup.











RELATED LINKS

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