I've just installed PowerCLI (VMWare PowerShell integration) and successfully created a PowerShell script to connect to an ESX server (and verified it works). I've also tried it from the command line without issues.
The issue is when I try to use this as an APM component it gives an error:
Add-PSSnapin : The type initializer for 'VMware.VimAutomation.Sdk.Interop.V1.CoreServiceFactory' threw an exception.
At line:1 char:13
+ Add-PSSnapin <<<< -Name VMware.VimAutomation.Core
+ CategoryInfo : NotSpecified: (:) [Add-PSSnapin], TypeInitializationException
+ FullyQualifiedErrorId : System.TypeInitializationException,Microsoft.PowerShell.Commands.AddPSSnapinCommand