powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Import-VApp



NAME
Import-VApp

SYNOPSIS
Imports OVF (Open Virtualization Format) and OVA packages. The package can contain a virtual appliance or a virtual
machine.

SYNTAX
Import-VApp [-Source] [[-Name] ] [-Location ] [-VMHost] [-Datastore re>] [-Force] [-Server ] [-RunAsync] [-WhatIf] [-Confirm] []


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 wh
en the OVF contains a single virtual machine.


PARAMETERS
-Source
Specify the path to the OVF or OVA you want to import.

Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Name
Specify a name for the imported virtual appliance.

Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Location
Specify a vSphere inventory container where you want to import the virtual appliance. It must be a virtual appl
iance, a resource pool, or a cluster.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true

-VMHost
Specify a host where you want to run the virtual appliance.

Required? true
Position? 3
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? true

-Datastore
Specify a datastore where you want to store the virtual appliance.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true

-Force
Indicate that you want to import an OVF or OVA package even if the package signature cannot be verified.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Server
Specify the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the co
mmand runs on the default servers. For more information about default servers, see the description of Connect-V
IServer.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true

-RunAsync
Indicate that the command returns immediately without waiting for the task to complete. In this mode, the outpu
t of the cmdlet is a Task object. For more information about the -RunAsync parameter run " help About_RunAsync"
in the vSphere PowerCLI console.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-WhatIf
Indicate that the cmdlet is run only to display the changes that would be made and actually no objects are modi
fied.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Confirm
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.

Required? false
Position? named
Default value $true
Accept pipeline input? false
Accept wildcard characters? false


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
VApp or VirtualMachine


NOTES


Returns a VApp object when the OVF contains a virtual appliance and a VirtualMachine object when the OVF contai
ns a single virtual machine.

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

C:\PS>Import-vApp -Source c:\vApps\WebServer\WebServer.ovf -VMHost $host


Imports an OVF package by specifying the target host and name.





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

C:\PS>Import-vApp -Source c:\vApps\WebServer\WebServer.ovf -VMHost $host -Cluster $productionCluster -Name WebServe
rProduction


Imports an OVF package within a cluster.





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

C:\PS>$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 --------------

C:\PS>$host | Import-vApp -Source c:\vApps\WebServer\WebServer.ova -Datastore $storage -Force


Imports an OVA package even if the package signature cannot be verified.






RELATED LINKS
Online version: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/Import-VApp.html
Export-VApp
Get-VApp
New-VApp
Remove-VApp
Set-VApp
Start-VApp
Stop-VApp
Move-VApp