VMware Cloud Community
RRONAN
Contributor
Contributor

Having Severe Issues with VI TK 1.5

When I try and connect to a VC using Get-VC or Connect-VIServer I recieve an exception error as shown below. The issue is just not limited to just connecting to a VC but just about any cmdlet within the VI toolkit. I have tried to remove and reinstall .NET 2.0, VI Toolkit, Powershell and the VIC. None of which corrects the issue.

cmdlet Connect-VIServer at command pipeline position 1

Supply values for the following parameters:

Server[0]: VC01

Server[1]:

Connect-VIServer : The type initializer for 'VMware.VimAutomation.Logging.SoapI

nterceptor.LoggingHelper' threw an exception.

At line:1 char:17

+ Connect-VIServer <<<<

+ CategoryInfo : NotSpecified: (Smiley Happy , TypeInitia

lizationException

+ FullyQualifiedErrorId : System.TypeInitializationException,VMware.VimAut

omation.Commands.ConnectVIServer

0 Kudos
15 Replies
admin
Immortal
Immortal

Hi,

Did you ever successfully use the 1.0 version of the toolkit?

0 Kudos
RRONAN
Contributor
Contributor

it used to work by using get-vc in 1.0 it would then prompt for a vc then challenge for credentials

0 Kudos
admin
Immortal
Immortal

Could you please file a support request for this issue? It looks like this one will need a bit of investigation.

0 Kudos
ykalchev
VMware Employee
VMware Employee

Hi,

Can you check the inner exception of the error you get?

You can do that by examining the PS $Error variable immediate after the error:

 $error[0].Exception.InnerException

Are you running VI TK 1.5 on Vista?

Do you have permissions to write in the %Temp% folder?

I suspect you got "Access Denied" error when we're trying to create temp log file in the %TEMP% directory.

Regards,

Yasen

Yasen Kalchev, vSM Dev Team
0 Kudos
RRONAN
Contributor
Contributor

OS - Win XP SP3

I do have full rights to the %temp% dir

C:\> get-vc

cmdlet Connect-VIServer at command pipeline position 1

Supply values for the following parameters:

Server[0]: virtualcenter

Server[1]:

Connect-VIServer : The type initializer for 'VMware.VimAutomation.Logging.SoapI

nterceptor.LoggingHelper' threw an exception.

At line:1 char:7

+ get-vc <<<<

+ CategoryInfo : NotSpecified: (Smiley Happy , TypeInitia

lizationException

+ FullyQualifiedErrorId : System.TypeInitializationException,VMware.VimAut

omation.Commands.ConnectVIServer

C:\> $error[0].Exception.InnerException

Unknown error "-1".

C:\>

0 Kudos
ykalchev
VMware Employee
VMware Employee

I've search for this error and it seems something is hooking the CreateFile API function. Virus checker, other monitoring software, that kind of problem...

Can you do that?

 $s = [http://System.IO.Path|http://System.IO.Path]::GetTempFileName()
"temp content" > $s
Get-Content $s

The script is attached since forum modify '[' symbols

Can you send me the stack trace and the type of the inner exception? Thanks.

$error[0].Exception.InnerException.GetType()
$error[0].Exception.InnerException.StackTrace

Yasen Kalchev, vSM Dev Team
0 Kudos
tanishsr
Contributor
Contributor

Hi,

Did you get the solution the above mentioned problem.

If yes, can you help me to come out of the problem, even I am facing the same issue while connecting to the server.

-regards,

Tanish

0 Kudos
RRONAN
Contributor
Contributor

I ran the script but the only content displayed in the log after execution is.

"temp content"

0 Kudos
tanishsr
Contributor
Contributor

Hi,

I also got the same content. After some detailed observation I found that Interceptor file was missing . I copied that file and problem solved.

-regards

0 Kudos
LucD
Leadership
Leadership

Do you still have the installation file ?

Can you check what build number is mentioned in the filename ?

See


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

0 Kudos
urbachr
Contributor
Contributor

Hello,

I am having the same problem. What is the interceptor file, where should I get it and where should I place it.

I am using the latest 1.5 download.

Thanks for your help

RWU

0 Kudos
tanishsr
Contributor
Contributor

WindowsFolder\assembly\GAC_MSIL\VMware.VimAutomation.Logging.SoapInterceptor : location where interceptor file is placed.

Try reinstalling VITK.

0 Kudos
urbachr
Contributor
Contributor

I am still having issues with VITK on my XP SP2 laptop. I have reinstalled VITK 1.5 many times. I have installed 1.0 and get the same error. I have uninstalled all VITK version and powershell and reinstalled both again. I have stopped my FW and AV software and other misc services and I still throw that error.

I have taken the .dll from server where it works and replaced the .dll on my laptop. That did not fix it either.

I have kinda run out of ideas at this point. Anybody know how to troubleshoot or fix this error? Here is the exact message I get.

C:\Program Files\VMware\Infrastructure\VIToolkitForWindows> connect-viserver usl-esx

Connect-VIServer : The type initializer for 'VMware.VimAutomation.Logging.SoapInterceptor.LoggingHelper' threw an exception

At line:1 char:17

+ connect-viserver <<<< usl-esx

Any help is greatly appreciated.

-RWU

0 Kudos
GoggiP365
VMware Employee
VMware Employee

Hi All,

had the same issue today and resolved the issue with the following.

Error message

'VMware.VimAutomation.Logging.SoapInterceptor.LoggingHelper' threw an exception

To resolve issue we needed to

Uninstall powercli 5.5. 

Install powercli 6.5

Reboot  PSC and vCenter.

Let me know if that resolves the issue.

0 Kudos
LucD
Leadership
Leadership

Thanks for your feedback, but to not confuse other readers in this community, you do realise that this thread, and the VI Toolkit 1.5, is 8 years old.

Not sure if I ever needed to restart vCenter for a PowerCLI issue.

I suspect your PowerCLI errors where sooner symptoms of a failing or faulty vCenter.

And if possible, I would advise to go for PowerCLI 6.5.1.


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

0 Kudos