PowerCLI Basics – Import Host Profile

A quick post on how to import a host profile into vCenter Server using vSphere PowerCLI. Here is the link to the cmdlet reference page.

  1. Open PowerCLI and connect to you vCenter Server: PowerCLI C:> Connect-VIServer <IP_or_FQDN>
  2. Next, use the following to import the profile: PowerCLI C:> Import-VMHostProfile –FilePath <Path> -Name <Profile_Name> -ReferenceHost <ESXi_host_Name>

For example: PowerCLI C:> Import-VMHostProfile -FilePath D:HostProfilesDefault.vpf -Name Default -ReferenceHost host-01.dr-lab-e.local Done. As you can see the host profile is now displayed under Host Profiles in the vCenter Server. All you have to do now, is to link it to the cluster and apply it to the hosts. PowerCli Basics - Import Host Profile 1 Note: make sure that the reference host is online and is accessible or you will receive an error message in the PowerCLI window stating that the host is invalid or incompatible. PowerCli Basics - Import Host Profile 2 This of course can also be done in the vCenter Server through the Host Profile import wizard. 🙂

Cheers!

– Marek.Z

Be the first to comment

Leave a reply...