It has been a while since I have written anything for my blog. Life has become crazy busy for me the last few months. Between normal work and family time I do not have a lot of free time. The following meme really sums up my life right now.
I have had to deploy a few OVA recently, but wanted to let those that are a little less technical have an easy quick way to accomplish this. Its not that complicated of a script, but it works and gets the job done. By using the Read-Host capability it allows user input into a Powershell script which can really expand Powershells capabilities.
connect-viserver “Your vCenter”
$vmSource = Read-Host – Prompt “File path to OVA”
$vmCluster = Get-Cluster – Name “Name of Cluster you want to use”
$vmHost = ($vmCluster | Get-VMHost)
$vmDatastore = Get-Datastore -Name “Name of Datastore to be used”
$vmName = Read-Host -Prompt “What to name VM?”
$vmHost | Import-vApp – Source $vmSource -Location $vmCluster -Datastore $vmDatastore -Name $vmName -Force