When I establish a brand new connection to our vcenter using credentials, the command runs just fine. But if I established that connection previously and try to share the session, I get this error:
Get-TagAssignment : 7/3/2023 3:05:11 PM Get-TagAssignment No Lookup service information is available for this vCenter
server.
At line:1 char:1
+ Get-TagAssignment
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-TagAssignment], CisException
+ FullyQualifiedErrorId : VMware.VimAutomation.ViCore.Impl.V1.Service.Tagging.Cis.TaggingServiceCisImpl.GetTagAssi
gnment.Error,VMware.VimAutomation.ViCore.Cmdlets.Commands.Tagging.GetTagAssignment
I am not sure what it means or how to troubleshoot it.
What do you mean by "share the session"?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
When you use Connect-VIServer, you are given a session id after successfully authenticating. You can then use that same session id in other PowerShell consoles with another Connect-VIServer using the -session argument. That's what I am talking about. Sometimes the initial connection to our on prem vsphere takes a very long time, so I want to be able to have a session pre-established that I can work with.
And you are sure that your original session didn't time out?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yes, I am very sure. I just tested it by creating a new session in 1 console, and immediately using that session id in another console window. The command fails exactly the same in the second console, while working fine in the 1st console.
Are you using an external PSC?
Can you reach https://<vCenter FQDN>:443/lookupservice/sdk on that 2nd station?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
That's what I get when I try the address you specified.
We are using vSphere version 7.0.3.01500. According to https://kb.vmware.com/s/article/83193 , that means there is no external PSC.
I feel I must clarify that it's not a second station / server I am trying to make the second connection with. They are just different PowerShell console windows. However, when I do connect from a different server using the same session id, I get the same error running the Get-TagAssignment command.
I just tested this in my lab in vSphere 8.* and PowerCLI 13.1.
With both PSV5.1 and PSV7.* I get the same error.
You discovered a bug it seems, I suggest opening an SR.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I'll do that. Thank you for confirming that for me.
I think I am running into the same situation... Did you get any resolution from the SR?
