Exception when accessing my ESX3i

Feb 27, 2009 at 2:50 PM
Hello,

I'm scripting in powershell but I'm stuck where I connect to my esx server:

1) "get-vm" works -- I get a warning about my certificate, but it connects:

Name                              Port                             User
----                              ----                             ----
172.16.17.111                     443                              root

2) then I try to execute this one: ConnectToVMWareVIServer(https://172.16.17.111/sdk, System.Net.NetworkCredential.UserName, System.Net
.NetworkCredential.Password)


result:
Exception calling "ConnectToVMWareVIServer" with "3" argument(s): "The type initializer for 'Vestris.VMWareLib.VMWareInterop' threw an exception."
At C:\WINDOWS\TEMP\3cb24fe3-d426-4e5f-8d6b-b9d109b87c65.ps1:37 char:33
+     $myHost.ConnectToVMWareVIServer <<<< ($hostname, $hostNet.UserName, $hostNet.Password)
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException


Exception calling "Open" with "1" argument(s): "The type initializer for 'Vestris.VMWareLib.VMWareI
nterop' threw an exception."
At C:\WINDOWS\TEMP\3cb24fe3-d426-4e5f-8d6b-b9d109b87c65.ps1:38 char:23
+     $vm = $myHost.Open <<<< ($vmx)
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException


What's the exceptions are about?
Coordinator
Feb 27, 2009 at 5:07 PM
I think you just don't have VIX SDK installed. VMWareTasks is a wrapper on top of that. 
http://www.vmware.com/support/developer/vix-api/
Let me know if this helps.