VMware Cloud Community
slesterOT
Contributor
Contributor

SSO issue with in power cli in C#

Hello every one !

I am currently working on a tool written in C# using the Powershell C# instance to communicate with our vcenter

vsphere version is 6.5.0.20000 Build 9451637

PowerCLI Version

----------------

VMware PowerCLI 6.5 Release 1 build 4624819

---------------

Component Versions

---------------

VMware Cis Core PowerCLI Component 6.5 build 4624453

VMware VimAutomation Core PowerCLI Component 6.5 build 4624450

tool running on .Net Framework 4.7.1

My issue is:

When i try to run this command:

$myTag = Get-Tag BKP_OTVCSA_CL3_J05_01

i get the following error:

vSphere single sign-on failed for connection '/VIServer=username@vcenterURI:443/'. Future operations which require single sign-on on this connection will fail. The underlying cause was: Specified algorithm is not valid.

Any other command is working fine. but all Tag related commands are failing.

This was working before we updated the vcenter and power cli (previous version 6.0 R2)

Any help is welcomed.

Simon

0 Kudos
5 Replies
LucD
Leadership
Leadership

You are using an old PowerCLI version, where the Tag related cmdlets are getting their info from the Inventory Service.

Recent PowerCLI versions use the REST API to get the Tag information, and shouldn't have this issue.

Please upgrade.


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

0 Kudos
slesterOT
Contributor
Contributor

Hello LucD

thanks for your answer.

Unfortunatly i don't reallty have the hand on what version of the power cli i can run.

An other weird thing is that the same command is working when launched from an actual powershell console.

Any other thoughts on my issue ?

Regards

Simon

0 Kudos
LucD
Leadership
Leadership

Not really I'm afraid.

You could try to do a network trace when you run the cmdlet from a PS console.
And from there try to decipher what the cmdlet is actually doing.
But that is a long shot.


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

0 Kudos
slesterOT
Contributor
Contributor

Thanks for your help.

We've found a workaround by installing your module RcisTag. Thanks to it we can access the tags informations.

Regards

0 Kudos
LucD
Leadership
Leadership

Great, it also uses the REST API.

Once you are able to upgrade your PowerCLI version, you should have working Tag cmdlets


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

0 Kudos