PowerCLI

 View Only
  • 1.  Get-Tag not working on latest PowerCLI on MAC

    Posted Sep 27, 2024 11:01 AM

    Hi,

    When I enter Get-Tag I get the following:

    Get-Tag Failed to get Lookup Service information for this vCenter server. Details: nodename nor servname provided, or not known (vcsa url:443)

    Any reason why this happens as all other commands are working ex: Get-VM, Get-VMHost etc..?

    Thanks



  • 2.  RE: Get-Tag not working on latest PowerCLI on MAC

    Posted Sep 27, 2024 11:04 AM

    Which PowerCLI version are you using?
    Is the service running on the VCSA?
    Can you try restarting the Lookup Service?



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


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


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



  • 3.  RE: Get-Tag not working on latest PowerCLI on MAC

    Posted Sep 27, 2024 03:57 PM

    VMware.PowerCLI 13.3.0 build 24145081

    No Access to SSH or VAMI am afraid, any other way I can check? (Maybe I can query that status from powercli itself?)

    Any such command limitations because I am on a MAC?




  • 4.  RE: Get-Tag not working on latest PowerCLI on MAC

    Posted Sep 27, 2024 04:07 PM

    I don't think it has anything to do with the platform from which your run the PowerCLI script.

    Another, rather drastic, method to check if the Lookup Service is the cause would be a restart of the VCSA.
    But I know that this is not always possible 



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


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


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



  • 5.  RE: Get-Tag not working on latest PowerCLI on MAC

    Posted Sep 27, 2024 04:43 PM

    so guess no other workaround or possible cause is it?

    Reason I need this is because I need to assign a tag to a list of VMs (in csv file), let me know if there are workarounds?

    Otherwise will try to reach out to the Admins to report back the service state.




  • 6.  RE: Get-Tag not working on latest PowerCLI on MAC

    Posted Sep 28, 2024 04:16 AM

    You could give the VMware.Community.CISTag module a try.



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


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


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



  • 7.  RE: Get-Tag not working on latest PowerCLI on MAC

    Posted Oct 01, 2024 02:24 AM
    LucD - get-tag worked after I tested successfully against another vCenter. (Weird)

    Thanks for all your help




  • 8.  RE: Get-Tag not working on latest PowerCLI on MAC

    Posted Oct 01, 2024 02:24 AM

    That seems to confirm there might be an issue with the Inventory Service on that vCenter.



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


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


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



  • 9.  RE: Get-Tag not working on latest PowerCLI on MAC

    Posted Oct 14, 2024 10:23 AM

    Hi,

    I've been in the same situation before. I recovered by restarting the vCenter service using the steps in KB316636.
    https://knowledge.broadcom.com/external/article/316636/gettagassignments-and-getspbmstoragepoli.html




  • 10.  RE: Get-Tag not working on latest PowerCLI on MAC

    Posted Oct 15, 2024 02:09 AM

    Thanks it started to work without any changes after trying against another vCenter…Thanks all