Auto Deploy and Image Builder profile functions
Alan Renouf is a community peer for VMware PowerCLI, Virtu-Al.Net. In 2009, he was named a vEXPERT by VMware. Alan's main focus is to teach and help other VMware admins automate their VMware infrastructures and make their lives easier through automation.
www.virtu-al.net.
One of the best and one of my favorite ideas from the PowerCLI team (there are so many to choose from) was to include an initialization script when you launch PowerCLI, this gives us the nice black background, custom prompt and also other things like the Get-VICommand function.
Get-VICommand lists all the VMware related cmdlets added to your session, this is useful for quickly listing the VMware cmdlets you need, most people think this is actually a cmdlet which is part of PowerCLI but if you have ever imported the VMware snapin into a PowerShell session and tried to use Get-VICommand you will quickly realize this is not part of the cmdlet set.
This is actually stored in the initialization file added when PowerCLI is installed, in my setup it is stored in the following location:
C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1
If you open this file you will find some nice to have PowerShell code and particularly the following:
![]()
This brings me to the reason for this post, I have started playing with the PowerCLI cmdlets for Image Builder and Auto Deploy and whilst learning them I found it useful to be able to list the cmdlets as the naming wasn’t always obvious.
To do this, I added the following code to my PowerShell Profile (read about PowerShell profiles here), it was suggested that I should blog this to make other peoples lives easier:

These will give you a cmdlet which lists the Image Builder cmdlets (Get-ImageBuilderCommand) and also the Auto Deploy cmdlets (Get-DeployCommand).
Another nice function to add is the following, this will allow you to easily add the VMware hosted software depot’s allowing easy access to the latest ESXi builds from VMware, I have named this Add-DefaultESXSoftwareDepot:

- xtravirt's blog
- Login or register to post comments
Spotlight:
VMware Documentation Downloader v11.08.30
Updated for vSphere 5 - A free tool for those on the move who need information FAST
vSphere 5 License Entitlement Changes
See what has changed in the license entitlement in vSphere 5?
Thin Client vs Zero Client
The differences between Thin and Zero desktop clients for VDI
