How To

PowerCLI Basics – Create custom vCenter Server role

A quick post on how to create a custom vCenter Server role using PowerCLI. Cmdlets and reference pages used in this example can be found here: New-VIRole Get-VIPrivilege Create custom vCenter Server role Open PowerCLI and connect to you vCenter Server: PowerCLI C:\> Connect-VIServer <IP_or_FQDN> Enter the Administrator credentials and login. Create a custom vCenter Server role by entering the following command: PowerCLI C:\> New-VIRole -Name “<Role_Name>” -Privilege (Get-VIPrivilege -Id <Privilege A>,<Privilege B>…<Privilege X>) Press Enter. PowerCLI should […]

unhide recovery partition
PowerCLI

PowerCLI Basics – Backup and Restore ESXi Configuration Data

Here is a quick post on how to backup and restore the ESXi configuration data using PowerCLI. Cmdlets used and the corresponding reference page: Get-VMHostFirmware Set-VMHostFirmware Backup First, connect to the vCenter Server with the PowerCLI C:\> Connect-VIServer command and enter your credentials. Backup the configuration data with PowerCLI C:\> Get-VMHostFirmware -VMHost <IP_or_FQDN> -BackupConfiguration -DestinationPath <Path> For example: PowerCLI C:\> Get-VMHostFirmware -VMHost 10.10.10.21 -BackupConfiguration -DestinationPath D:\Configs\esx03 The backup file will be saved as a .tgz […]

unhide recovery partition
How To

PowerCLI Basics – Create custom ESXi ISO image

Here is a quick post on how to create a custom ESXi ISO image using PowerCLI. Cmdlets used and the corresponding reference page: Add-ESXSoftwareDepot New-EsxImageProfile Export-EsxImageProfile First, connect to the vCenter Server: PowerCLI C:> Connect-VIServer <IP_or_FQDN> Next, add the ESXi offline bundle to the depot: PowerCLI C:> Add-EsxSoftwareDepot C:VMware-ESXi-5.5.0-1331820-depot.zip Add a custom driver to the depot. I used the iSCSI Driver for Emulex: PowerCLI C:> Add-EsxSoftwareDepot C:be2iscsi-10.0.727.44-offline_bundle-1525244.zip Clone the ESXi image: PowerCLI C:> New-EsxImageProfile -CloneProfile […]

unhide recovery partition
PowerCLI

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. Open PowerCLI and connect to you vCenter Server: PowerCLI C:> Connect-VIServer <IP_or_FQDN> 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 […]