Jul 20

PowerActions won’t uninstall – Unregister lookup service object


Poweractions is one of the best flings ever created in my opinion. If you do not know what PowerActions is, you can find out more about it HEREhttps://labs.vmware.com/flings/poweractions-for-vsphere-web-client

I ran into an issue where I was trying to update PowerActions. To do this, I tried to uninstall PowerActions from the remote PowerShell VM I had. When it finished ‘uninstalling’ it still showed up in my add/remove programs, as well as it appeared to have all the files still on my machine (including registry keys and hidden folder data).

I then tried a few other things to remove PowerActions and then ended up trying to just remove all registry keys and files on the machine. This seemed to work until I went to install PowerActions and it said: “Error in connecting to lookup service: Another installation of PowerActions is already registered with this lookup service instance”

Screenshot 2015-07-20 10.15.47

Ok, so I originally thought (now this was 1am so bear with me) that this was an issue on the PowerShell host side of things. I racked my brain for nearly an hour before having one of those “doh!” moments and went to my vCenter. The documentation for PowerActions states that you can run a command:

that will allow you to edit/work with the services registered to the lookup service. Turns out, this only works with vSphere 5.5 and earlier. As of vSphere 6.0 and on, there is a new command:

Thanks to William Lam for sending me in the right direction. After SSH’ing into vCenter and running lstool.py I was able to find the two PowerActions objects registered to the lookup service. To find them, I ran:

which returned a lot of information, but the two I was looking for were at the very bottom (something to investigate is whether the newest registered objects always appear last… anyways I digress):

Screenshot 2015-07-20 09.54.19

Now that I found the two objects and their Service ID (which is what I needed in the first place), I can run the ‘unregister’ command and remove them from vCenter. The unregister command requires the following:

  • –url (of the lookup service)
  • –id (the Service ID that we just found)
  • –user (Username of the vCenter Account)
  • –pasword (Password corresponding to the previous account)
  • –no-check-cert (just for safe measures)

Putting that together looks like this:

Screenshot 2015-07-20 10.03.50

Once you have run this, you can re-run the previous command to list the objects and see that they have truly been unregistered. At this point, you can go in again and re-install PowerActions successfully.

Screenshot 2015-07-20 11.13.56

1 comment

  1. Jason Boche

    Hi Brian,

    I just wanted to let you know that this article (along with Mr. Lam’s guidance) helped me out A LOT with manually removing PowerActions from my vCSA 6 appliance so that I could re-install. My PowerActions host got nuked and so I had no clean uninstall action. It would be nice if this information could make it into the Fling .pdf document.

    There are two corrections to your removal script:
    /user/lib/vmidentity/tools/scripts/lstool.py unregister –url http://localhost:7080/lookupservice/sdk –id lab:26457e37-0056-4c77-a052-453bc5587af6 –user ‘administrator@vsphere.local’ -password ‘VMw@re123’ –no-check-cert

    should read

    /usr/lib/vmidentity/tools/scripts/lstool.py unregister –url http://localhost:7080/lookupservice/sdk –id lab:26457e37-0056-4c77-a052-453bc5587af6 –user ‘administrator@vsphere.local’ –password ‘VMw@re123’ –no-check-cert

    Differences are:
    /usr/ versus /user/ for the correct path
    -password needs to be –password with two dashes

    Thanks again!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

19 + 16 =