2010-11-02

Get-vSphereClient Function

As was posted on the new KB article 1029925 the vSphere Client is no longer packaged with current builds of ESX and ESXi. However it is packaged with vCenter, so you can still get it from the web interface of your vCenter server.

Since they have posted a direct URL to the download I decided to wrap this in a PowerShell script
Get-vSphereClient.

Function Get-vSphereClient {
<#
.SYNOPSIS
 Downloads the vsphere 4.1 Build 258902 Client
.DESCRIPTION
 As was posted on the new KB article 1029925 the vSphere Client is no longer 
 packaged with builds of ESX and ESXi. This function will download the vSphere 
 client from VMware's site
.NOTES
 Author: Maish Saidel-Keesing
.PARAMETER Url
 The url for the .exe file
.PARAMETER Path
 The location the file will be saved
.EXAMPLE
 PS> Get-vSphereClient -url http://vsphereclient.vmware.com/vsphereclient/2/5/8/9/0/2/VMware-viclient-all-4.1.0-258902.exe -path c:\temp\viclient.exe 
#>

param (
$url="http://vsphereclient.vmware.com/vsphereclient/2/5/8/9/0/2/VMware-viclient-all-4.1.0-258902.exe", 
$path="c:\temp\VMware-viclient-all-4.1.0-258902.exe" 
)

##Create Web Client 
$client = new-object System.Net.WebClient
$client.DownloadFile($url,$path)
}

Hope you can make use of this.

Jase McCarty posted an article on on how to change this behavior on his blog a few months back as well.