VMware Cloud Community
bbijesh
Contributor
Contributor

How to use the 32 bit VMware.View.Broker snapin on a 64 bit machine?

Hello All,

As part of the cloning automation, the script uses New-OSCustomizationSpec api. The script is executed from a .net application that invokes the script with the help of powershell snapins VMWare.View.Broker and VMware.VimAutomation.Core. When I build the .net program targeting 64 bit machine (the program runs on the connection server which is a 64bit machine), the New-OSCustomizationSpec api fails stating that it is supported only on 32 bit. So I rebuilt the .net application for 32 bit. However now executing the script itself fails as the VMWare.View.Broker snapin is not available (I guess it is looking for the 32 bit version of the snapin). Any of you have com across similar scenario? Any idea how to get the 32 bit snapins on a 64 bit machine? I tried to install using 32 bit installUtil tool; however the 32 bit dlls are not available.

Thanks in advance for the help.

Warm Regards,

Bijesh

0 Kudos
1 Reply
bbijesh
Contributor
Contributor

As the New-OSCustomizationSpec api is from VMware.VimAutomation.Core, found a a work around to execute this command alone in 32 bit.

start-job -RunAs32 {

Add-PSSnapin VMware.VimAutomation.Core

New-OSCustomizationSpec -Name $osCustomizationSpecName ... ... ...

} |  wait-job | Receive-Job

This runs the command in 32 bit environment and returns the result.