VMware Cloud Community
Erik_Gross
Contributor
Contributor

Installer issue

Has anyone else had an issue installing the Update Manager PowerCLI?

I tried the install and got an error first that vSphere PowerCLI wasn't installed (i had the older version 'vi toolkit'), so i grabbed the latest vSphere PowerCLI and got that installed and going, but now i'm getting an error that the UM PowerCLI is already installed, but i'm not seeing the commandlets when i 'get-command...'

I'm guessing the first install attempt set a pointer that the UM PowerCLI was installed, but when it failed, it didn't clear the pointer. (I've checked the 'add/remove software' and don't see the UM PowerCLI there either.)

Any help is appreciated.

Erik Gross

Reply
0 Kudos
12 Replies
Erik_Gross
Contributor
Contributor

Found the problem. There was an old registry entry at 'HKLM\SOFTWARE\VMware, Inc.' named 'VMware Infrastructure Update Manager - PowerShell Library' that had a key name 'Installedversion' with the old version number there.

For some reason, the installer does not check the version number to determine if it you are installing a newer version. The installer saw the existing key (that had a value of '1.something') and decided it was going to quit.

Hopefully this will help others who may fight the old version issue.

Good luck.

Erik Gross

erik.gross@gdc4s.com

Reply
0 Kudos
richG
Contributor
Contributor

Yes I had the same problem and was racking my brain trying to figure out what I could not see the new cmdlets I also got the same error saying I already had it installed, but when I looked at the pssnapin's it was not there.

The idea of removeing the installedversion from the registery worked. I would like to clarify that I first removed from vmware update manager client 1.0u4 and it did not work I then tried from client 1.0u3 and finally from vmware infrastructure update manager - powershell library and that one worked.

so here is the direct location if anyone runs into the problem which I am sure folks will.

HKey_local_machine > software > vmware, inc. > vmware infrastructure update manager - powershell Library

Installedversion

I cleared the key contains and after it did install the key had data 4.0.0.4472

Hope this helps the next person..

Reply
0 Kudos
JRink
Enthusiast
Enthusiast

is that erik gross of rubber ducky racing?

Reply
0 Kudos
Erik_Gross
Contributor
Contributor

Nope... at least not unless the multiple-personality meds are wearing off and he, I mean I, didn't realize it.

Smiley Wink

Reply
0 Kudos
Erik_Gross
Contributor
Contributor

Rich - I had tried the uninstall/re-install route myself but had same results as your confirmed. I guess I should probably send a copy of these posts to our TAM and see if he can kick it up to the engineers to tweak the next version of the installer.

Keep on shelling...

:smileygrin:

Reply
0 Kudos
richG
Contributor
Contributor

thanks for the reply yes I did bang my head for a while till I came upon your solution and it work thanks..

I do have a question which has nothing to do with this problem. Ok the cmdlet get-snapshot I have been trying to get all the methods and properties for this cmdlet and have run into a few snags so maybe you can help.

Here it the way I have been doing it.

get-command get-snapshot | get-member

what am I doing wrong??

thanks again for the help.

Rich

Reply
0 Kudos
Erik_Gross
Contributor
Contributor

Rich - You can iterate the properties and methods of any PowerShell command by using the following...

get-command get-snapshot | get-member

Another way (I use a lot when trying to decide what to display when looking at VMs or hosts or datastores) is to use the regular get-... command and then pipe it to format-list and show all properties.

Example: "get-vmhost |fl -property *"

This doesn't show methods but it does show all properties.

Take care,

Erik Gross

This message and/or attachments may include information subject to GDC4S O.M. 1.8.6 and GD Corporate Policy 07-105 and are intended to be accessed only by authorized recipients. Use, storage and transmission are governed by General Dynamics and its policies. Contractual restrictions apply to third parties. Recipients should refer to the policies or contract to determine proper handling. Unauthorized review, use, disclosure or distribution is prohibited. If you are not an intended recipient, please contact the sender and destroy all copies of the original message.

NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose.

Reply
0 Kudos
richG
Contributor
Contributor

Thanks very much I might be looking for a property that is just not there.

I do appreciate you help.

Have a great day or evening .

Rich

Reply
0 Kudos
Erik_Gross
Contributor
Contributor

Wow, guess I should re-read your email before sending... Just realized that I sent your command back to you... DOH!!!

I did some digging, thought I came up with a great way, and even tested it and sent it back to you... I need to go drink something with caffeine...

Your command does work for me. Are you getting anything back at all?

Erik Gross

This message and/or attachments may include information subject to GDC4S O.M. 1.8.6 and GD Corporate Policy 07-105 and are intended to be accessed only by authorized recipients. Use, storage and transmission are governed by General Dynamics and its policies. Contractual restrictions apply to third parties. Recipients should refer to the policies or contract to determine proper handling. Unauthorized review, use, disclosure or distribution is prohibited. If you are not an intended recipient, please contact the sender and destroy all copies of the original message.

NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose.

Reply
0 Kudos
richG
Contributor
Contributor

Hi Erik,

Ok here is my question that has been really bugging me. In this script below you can see $snap.SizeMB I am trying to figure out if there is a property for this. Now I did get this script off the web it does work but can not for the life of me figure out where this property is coming from.

Param ($age=30)

Connect-VIServer

$vm = Get-VM

$snapshots = Get-Snapshot -VM $vm

Write-Host -ForegroundColor Red "Old Snapshots Found"

foreach ($snap in $snapshots) {

if ($snap.created -lt (Get-Date).adddays(-$age)) {

Write-Host " VM: " $snap.VM, "Name: " $snap.Name, " Size: " $snap.SizeMB, " Created: " $snap.Created

}

}

another point I would love is if there was an easy switch for kb mb gb I know you can write a conversion to do it but lets face it how many folks want KB most of work in now a days either GB or TB let alone MB. Sorry had to sound off. Thanks for help much appreciated and yes I could us a cup of joe as well.

Reply
0 Kudos
Erik_Gross
Contributor
Contributor

Ok, looks like my way actually does work better (there's a first for everything)...

Try using the following:

get-snapshot * | format-list -property *

That will show you all the properties actually being retrieved by the get-snapshot command. Be carefull if you have a lot of snapshots out there. This can take a while to walk through them all. Substitute and actual snapshot name for the '*' (asterisk) if you know one.

You can use something like:

get-snapshot * | sort-object SizeMB -descending | format-table -property VM,SizeMB,Created,IsCurrent -auto

to get a pretty decently formatted report with most of the important information. Obviously you could easily tweak around what you are sorting on and what you want to display and even easily output to some formatted output (CSV, HTML, etc.). One other note, remember powershell has (and you can create your own) alias' for commands (get-alias * to see them all). You could sub 'sort' for 'sort-object' and 'ft' for 'format-table'.

Later.

Erik Gross

This message and/or attachments may include information subject to GDC4S O.M. 1.8.6 and GD Corporate Policy 07-105 and are intended to be accessed only by authorized recipients. Use, storage and transmission are governed by General Dynamics and its policies. Contractual restrictions apply to third parties. Recipients should refer to the policies or contract to determine proper handling. Unauthorized review, use, disclosure or distribution is prohibited. If you are not an intended recipient, please contact the sender and destroy all copies of the original message.

NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose.

Reply
0 Kudos
richG
Contributor
Contributor

Erik,

You have no idea how much this means thank you so very much... I have been trying for a few days now to figure this out. I know it might sound silly but it was really bugging me on how they were able to use this property and now I know.

I am still learning but each day gets better I do enjoy this I have been a linux/windows admin for years now and have done a bit of scripting, but now I am determined to learn PS and write my own stuff. I will say the forums work wonders not like the earlydays when you had to bang you head against a wall and read every book you could get your hands on.

Hey thanks very much I really do appreciate the help..

I hope you have a great evening..

Regards,

Rich

Reply
0 Kudos