VMware Cloud Community
YevB
Contributor
Contributor

PowerCLI through C# (Add-PSSnapin Exception)

Greetings,
Im trying to run PowerCLI commands through C# (Visual Studio).
At the beggining had no problem, but then suddenly,
I have encourted and weird exception:
"A requested PowerCLI component was not found on the local system: VMware.VimAutomation.ViCore.Cmdlets"
Inner Exception:
"The given key was not present in the dictionary"

I have added reference to all VMware's .dlls (including VMware.VimAutomation.ViCore.Cmdlets)

I getting the error while trying to add the snapin ("Add-PSSnapin VMware.VimAutomation.Core")

It's works fine while i'm using PowerShell commands, but when trying to add the Snapin getting the exception.

Anyone any suggestions??

Best regards.

Reply
0 Kudos
2 Replies
nmdhussain
Contributor
Contributor

Hi Yev B,

Am also facing the same problem, could you find any solution to this?

Thanks

Hussain

Reply
0 Kudos
cingil
Contributor
Contributor

İ get the similar problem, is there any solution?

Reply
0 Kudos