PowerCLI

 View Only
  • 1.  SSO issue with in power cli in C#

    Posted Feb 27, 2019 10:14 AM

    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



  • 2.  RE: SSO issue with in power cli in C#

    Posted Feb 27, 2019 10:21 AM

    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.



  • 3.  RE: SSO issue with in power cli in C#

    Posted Feb 27, 2019 11:01 AM

    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



  • 4.  RE: SSO issue with in power cli in C#

    Posted Feb 27, 2019 11:09 AM

    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.



  • 5.  RE: SSO issue with in power cli in C#

    Posted Feb 27, 2019 04:58 PM

    Thanks for your help.

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

    Regards



  • 6.  RE: SSO issue with in power cli in C#

    Posted Feb 27, 2019 05:13 PM

    Great, it also uses the REST API.

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