Syntax
Import-VApp [-Source] <String> [[-Name] <String>] [-Location <VIContainer>] [-VMHost] <VMHost> [-Datastore <Datastore>] [-Force] [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]Related Commands
Online versionDetailed Description
Imports OVF (Open Virtualization Format) and OVA packages. The package can contain a virtual appliance or a virtual machine. The cmdlet returns a VApp object when the OVF contains a virtual appliance and a VirtualMachine object when the OVF contains a single virtual machine.Parameters
| Name | Type | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Source | String | Specify the path to the OVF or OVA you want to import. | true | false | |
| Name | String | Specify a name for the imported virtual appliance. | false | false | |
| VMHost | VMHost | Specify a host where you want to run the virtual appliance. | true | true (ByValue) | |
| Confirm | SwitchParameter | If 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. | false | false | $true |
| Datastore | Datastore | Specify a datastore where you want to store the virtual appliance. | false | false | |
| Force | SwitchParameter | Indicate that you want to import an OVF or OVA package even if the package signature cannot be verified. | false | false | |
| Location | VIContainer | Specify a vSphere inventory container where you want to import the virtual appliance. It must be a virtual appliance, a resource pool, or a cluster. | false | false | |
| RunAsync | SwitchParameter | Indicate 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. | false | false | |
| Server | VIServer[] | 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. | false | false | |
| WhatIf | SwitchParameter | Indicate that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |
Return Type
VApp or VirtualMachineNotes
Returns a VApp object when the OVF contains a virtual appliance and a Virtu alMachine object when the OVF contains a single virtual machine.Examples
-------------- Example 1 --------------
Import-vApp -Source c:\vApps\WebServer\WebServer.ovf -VMHost $host
Imports an OVF package by specifying the target host and name.
-------------- Example 2 --------------
Import-vApp -Source c:\vApps\WebServer\WebServer.ovf -VMHost $host -Cluster $productionCluster -Name WebServerProduction
Imports an OVF package within a cluster.
-------------- Example 3 --------------
$host | Import-vApp -Source c:\vApps\WebServer\WebServer.ovf -Datastore $storage
Imports an OVF package by specifying a datastore where to store the virtual machines.
-------------- Example 4 --------------
$host | Import-vApp -Source c:\vApps\WebServer\WebServer.ova -Datastore $storage -Force
Imports an OVA package even if the package signature cannot be verified.