VMware Cloud Community
jmedd
Enthusiast
Enthusiast

Install PowerCLI via command line with target destination

I want to automate the installation of PowerCLI via the command line options. I have the basics which is:

VMware-PowerCLI-5.1.0-793510.exe /s /v/qn

however, I also need to be able to install it to a custom location, such as e:\program files\vmware\powercli.

Anyone know the syntax for that? I've tried

VMware-PowerCLI-5.1.0-793510.exe /s /v/qn INSTALLDIR="e:\program files\vmware\powercli"

but with no luck.

Blog: http://jonathanmedd.net | Twitter: @jonathanmedd
Tags (1)
0 Kudos
2 Replies
jmedd
Enthusiast
Enthusiast

So I can get it to work with a file path of no spaces e.g.

VMware-PowerCLI-5.1.0-793510.exe /s /v"/qn INSTALLDIR="e:\temp\powercli"

but not with one including spaces

VMware-PowerCLI-5.1.0-793510.exe /s /v"/qn INSTALLDIR=`"e:\program files\vmware\powercli`""

Blog: http://jonathanmedd.net | Twitter: @jonathanmedd
0 Kudos
LucD
Leadership
Leadership

Had a quick look with Orca at the MSI file.

Since they seem to be determining their installationfolder in a peculiar way I would suggest trying a transform file.

I suspect you will have to override TARGETDIR, ProgramFilesFolder, INFRASTRUCTURE, VMWARE and VMWARE_VSPHERE_POWERCLI in the Directory section.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference