Export-VApp
This cmdlet exports a vApp or a single virtual machine to the specified destination. If no destination is specified, the cmdlet creates a new folder in the current working directory and exports the vApp or the virtual machine to it. The name of the new folder is the same as the name of the vApp or the virtual machine as it appears in vCenter Server.
Syntax
[-CreateSeparateFolder]
[-Description <String>]
[-Destination <String>]
[-Force]
[-Format <VAppStorageFormat>]
[-Name <String>]
[-RunAsync]
[-SHAAlgorithm <SHAAlgorithm>]
[-Server <VIServer[]>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
VApp[] | 1 |
|
Specifies the vApp that you want to export. | optional |
|
SwitchParameter | named |
|
Indicates that you want to create a separate folder for each vApp or virtual machine. | optional |
|
String | named |
|
Provides a description of the exported vApp or virtual machine. | optional |
|
String | named |
|
Specifies a destination path to the file system location where you want to export the vApp or the virtual machine. If the value of the Destination parameter is a folder, the vApp or the virtual machine is exported to a container folder (OVF). If the destination is a file, the vApp or the virtual machine is exported in OVA format. | optional |
|
SwitchParameter | named |
|
Indicates that the cmdlet overwrites the existing destination files and creates directories to complete the specified file path. | optional |
|
VAppStorageFormat | named |
|
Specifies the file format of the specified vApp or virtual machine. The default format is OVF. The valid values are OVF and OVA. | optional |
|
String | named |
|
Specifies a name for the exported vApp or virtual machine. | optional |
|
SwitchParameter | named |
|
Indicates 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 VMware PowerCLI console. | optional |
|
SHAAlgorithm | named |
|
Specifies the hashing algorithm that you want to use in the manifest checksums. The default value is SHA256. The valid values are SHA256 and SHA1. | optional |
|
VIServer[] | named |
|
Specifies the vCenter Server systems 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 the Connect-VIServer cmdlet. |
[-CreateSeparateFolder]
[-Description <String>]
[-Destination <String>]
[-Force]
[-Format <VAppStorageFormat>]
[-Name <String>]
[-RunAsync]
[-SHAAlgorithm <SHAAlgorithm>]
[-Server <VIServer[]>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
VirtualMachine[] | named |
|
Specifies the virtual machine that you want to export. | optional |
|
SwitchParameter | named |
|
Indicates that you want to create a separate folder for each vApp or virtual machine. | optional |
|
String | named |
|
Provides a description of the exported vApp or virtual machine. | optional |
|
String | named |
|
Specifies a destination path to the file system location where you want to export the vApp or the virtual machine. If the value of the Destination parameter is a folder, the vApp or the virtual machine is exported to a container folder (OVF). If the destination is a file, the vApp or the virtual machine is exported in OVA format. | optional |
|
SwitchParameter | named |
|
Indicates that the cmdlet overwrites the existing destination files and creates directories to complete the specified file path. | optional |
|
VAppStorageFormat | named |
|
Specifies the file format of the specified vApp or virtual machine. The default format is OVF. The valid values are OVF and OVA. | optional |
|
String | named |
|
Specifies a name for the exported vApp or virtual machine. | optional |
|
SwitchParameter | named |
|
Indicates 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 VMware PowerCLI console. | optional |
|
SHAAlgorithm | named |
|
Specifies the hashing algorithm that you want to use in the manifest checksums. The default value is SHA256. The valid values are SHA256 and SHA1. | optional |
|
VIServer[] | named |
|
Specifies the vCenter Server systems 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 the Connect-VIServer cmdlet. |
Output
System.IO.FileInfo
Examples
Example 1
Retrieves all vApps whose names start with "MyVApp" and exports them to the specified path.
Example 2
Exports the vApp in the $myVApp variable to the specified location and assigns a name to the folder.
Example 3
Exports the vApp in the $myVApp variable to the specified location without creating a separate folder for each virtual appliance.
Example 4
Exports a vApp in OVA format.
Example 5
Retrieves all virtual machines whose names start with "MyVM" and exports them to the specified path.
Example 6
Creates a new virtual machine and exports it in OVA format.
Example 7
Exports a virtual machine to the same path twice. The second time forces an override of the previously exported files.
Related Commands