vSphere PowerCLI Reference

Export-VApp

Synopsis

Exports a virtual appliance to the provided destination.

Syntax

Export-VApp [[-Destination] <String>] [-VApp] <VApp[]> [-Name <String>] [-Force] [-Format <VAppStorageFormat>] [-CreateSeparateFolder] [-Description <String>] [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VApp
Import-VApp
New-VApp
Remove-VApp
Set-VApp
Start-VApp
Stop-VApp
Move-VApp

Detailed Description

Exports a virtual appliance to the provided destination. If no destination is specified, the cmdlet creates a new folder in the current working directory and exports the virtual appliance to it. The name of the new folder is the same as the name of the virtual appliance as it appears in vCenter Server.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
DestinationStringSpecify a destination path to the file system location where you want to export the virtual appliances. If the value of the Destination parameter is a folder, the virtual appliance is exported to a container folder (OVF). If the destination is a file, the virtual appliance is exported in OVA format.falsefalse
VAppVApp[]Specify the virtual appliance you want to export.truetrue (ByValue)
ConfirmSwitchParameterIf the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation.falsefalse$true
CreateSeparateFolderSwitchParameterIndicate that you want to create a separate folder for each virtual appliance.falsefalse
DescriptionStringProvide a description of the exported virtual appliance.falsefalse
ForceSwitchParameterIndicate whether the cmdlet overwrites the existing destination files and creates directories to complete the specified file path.falsefalse
FormatVAppStorageFormatSpecify the file format of the specified virtual appliance. The default format is OVF. The valid values are OVF and OVA.falsefalse
NameStringSpecify a name for the exported virtual appliances.falsefalse
RunAsyncSwitchParameterIndicate that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the -RunAsync parameter run " help About_RunAsync" in the vSphere PowerCLI console.falsefalse
ServerVIServer[]Specify the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.falsefalse
WhatIfSwitchParameterIndicate that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type

FileInfo

Notes

Examples

-------------- Example 1 --------------

Get-VApp VApp* | Export-VApp "c:\vapps\"

Retrieves all virtual appliances whose names start with "VApp" and exports them to the specified path.

-------------- Example 2 --------------

Export-VApp "c:\NewFolder\" $vApp -Name "EMail_vApp" -Force

Exports the virtual appliances in the $vApp variable to the specified location and assigns a name to the folder.

-------------- Example 3 --------------

Export-VApp -vApp $vApp -Destination "c:\vapps\Vapp\" -Force -CreateSeparateFolder:$false

Exports the virtual appliances in the $vApp variable to the specified location without creating a separate folder for each virtual appliance.

-------------- Example 4 --------------

Export-VApp -vApp $vApp -Destination "c:\vapps\myVapp\" -Format Ova

Exports a virtual appliance to an Ova file.


Copyright © 1998 - 2011 VMware, Inc. All rights reserved.