PowerCLI-Example-Scripts icon indicating copy to clipboard operation
PowerCLI-Example-Scripts copied to clipboard

Connect-SSOAdminServer failed with some vCenter Servers

Open NikGK opened this issue 3 years ago • 3 comments

Describe the bug

I have installed several vCenter servers v7.0U3 with the same build. I 'm using the module (Import-Module ./VMware.vSphere.SsoAdmin.psd1) downloaded from your repisitory. I want to use the Connect-SsoAdminServer command but I notice the command is failed with certain vCenter Server and not with another ones.

I use the fqdn of vCenter Server as parameter server.

Connect-SsoAdminServer -Server 'fqdn of vic '

cmdlet Connect-SsoAdminServer at command pipeline position 1 Supply values for the following parameters: (Type !? for Help.) User: [email protected] Password: ************

Here the message error Connect-SsoAdminServer : One or more errors occurred. At line:1 char:1

  • Connect-SsoAdminServer -Server FQDN-VIC...
  •   + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Connect-SsoAdminServer
    
    

if I wan to go deeper in the error

$error[0] | select *

writeErrorStream : True PSMessageDetails : Exception : Microsoft.PowerShell.Commands.WriteErrorException: One or more errors occurred. TargetObject : CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Connect-SsoAdminServer ErrorDetails : InvocationInfo : System.Management.Automation.InvocationInfo ScriptStackTrace : at Connect-SsoAdminServer<Process>, C:\My Datas\NID\Training_Programssources\My Scripts Powershell\PowerCLI_Repo\Modules\VMware.vSphere.SsoAdmin\Connect.ps1: line 85 at <ScriptBlock>, <No file>: line 1 PipelineIterationInfo : {0, 1}

Have you any ideas?

Reproduction steps

1. Import-Module ./VMware.vSphere.SsoAdmin.psd1
2. Connect-SsoAdminServer -Server FQDN-vCenter
3. Enter [email protected] ( here: [email protected] )
4. Enter password
5. Get error ( see info above)
...

Expected behavior

I have to get this kind of message:

cmdlet Connect-SsoAdminServer at command pipeline position 1 Supply values for the following parameters: (Type !? for Help.) User: [email protected] Password: ************

Name : FQDN-VIC ServiceUri : https://FQDN-VIC/sso-adminserver/sdk/vsphere.local User : [email protected] Id : /SsoAdminServer=vsphere.local/administrator@FQDN-VIC IsConnected : True Client : VMware.vSphere.SsoAdminClient.SsoAdminClient RefCount : 1

Additional context

No response

NikGK avatar Feb 02 '22 12:02 NikGK

Hi, in case the deployment topology is one SSO for many VC servers then you have to specify the SSO Server (Management Node) address to the Connect-SsoAdminServer command.

dmilov avatar Feb 25 '22 09:02 dmilov

I have also these Error.. Any Suggestion or info how to Resolve that? I receive the following Error when i try to connect on many vCenter Servers.. (vCenter 7 and also 8)

Connect-SsoAdminServer : One or more errors occurred. At line:1 char:1

  • Connect-SsoAdminServer -Server test.com -User administ ...
  •   + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Connect-SsoAdminServer
    
    

PS C:\Users\test> $error[0] | select *

writeErrorStream : True PSMessageDetails : Exception : Microsoft.PowerShell.Commands.WriteErrorException: One or more errors occurred. TargetObject : CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Connect-SsoAdminServer ErrorDetails : InvocationInfo : System.Management.Automation.InvocationInfo ScriptStackTrace : at Connect-SsoAdminServer<Process>, C:\Program Files\WindowsPowerShell\Modules\VMware.vSphere.SsoAdmin\1.3.9\Connect.ps1: line 110 at <ScriptBlock>, <No file>: line 1 PipelineIterationInfo : {0, 1}

wolficool avatar Jan 24 '24 16:01 wolficool

Can you run this script that will list the full error details:

$ErrorRecord = $error[0] $ErrorRecord | Format-List * -Force $ErrorRecord.InvocationInfo |Format-List * $Exception = $ErrorRecord.Exception for ($i = 0; $Exception; $i++, ($Exception = $Exception.InnerException)) { “$i” * 80 $Exception |Format-List * -Force }

kamennikolov avatar Jan 29 '24 13:01 kamennikolov