< Back

Export-AzureVM

Wed Jan 30, 2019 5:43 pm

NAME Export-AzureVM



SYNOPSIS

Exports an Azure virtual machine state to a file.





SYNTAX

Export-AzureVM [-ServiceName] <String> [-Name] <String> [-Path] <String> [-Profile <AzureSMProfile>] [-InformationAction <ActionPreference>]

[-InformationVariable <String>] [<CommonParameters>]





DESCRIPTION

The Export-AzureVM cmdlet exports the state of a virtual machine to an .xml file.



Running Export-AzureVM, followed by Remove-AzureVM and then Import-AzureVM to recreate a virtual machine can cause the resultant virtual machine to have

a different IP address than the original.





PARAMETERS

-ServiceName <String>

Specifies the name of the Azure service that hosts the virtual machine.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Name <String>

Specifies the name of the virtual machine for which this cmdlet exports state.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Path <String>

Specifies the path and file name to which this cmdlet saves the virtual machine state.



Required? true

Position? 2

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Profile <AzureSMProfile>

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InformationAction <ActionPreference>





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InformationVariable <String>





Required? false

Position? named

Default value None

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









-------------------------- Example 1: Export a virtual machine --------------------------



PS C:\\>Export-AzureVM -ServiceName "ContosoService" -Name "ContosoRole06" -Path "C:\\vms\\VMstate.xml"



This command exports the state of the specified virtual machine to the VMstate.xml file.



RELATED LINKS

Import-AzureVM