VMware Cloud Community
Dabosa
Contributor
Contributor

Uninstalling vmtools

Hello

I'm in a bit of a pickle. I thought maybe I could ask you and see if you might have a solution.

In our environment we've got about 800 VMs with really old vmtools-versions that aren't possible to upgrade or uninstall unless we use "setup /c".

However, doing this manually on 800 servers will take alot of time. I've tried finding a way to do this through PowerShell or PowerCLI but no luck.

I'm able to mount the media on VMs through PowerCLI but I'm not able to run "D:\setup /c".

I don't know what the issue is. Do you have any idea or a script that I could use in order to run this on so many machines?

I've tried other methods, like using SCCM to deploy the media with the "/c" switch but it's failing and I think it might be because when running "setup /c" you get a popup window that requires confirmation that it is OK to cleanup everything. I haven't been able to find a silent switch for this.

I tried using "setup /c "/qn"" as well but no luck there either. The "qn" switch seems only to work while installing but not while removing.

Any ideas?

Thanks in advance!

0 Kudos
6 Replies
Marmotte94
Enthusiast
Enthusiast

Hi,

I think you can use something like that in powerCLI. And add a loop foreach if it works.

You can look at the configuration IP for your VM MyVMName.

$MyVM = "MyVMName"

Dismount-Tools -VM $MyVM

Mount-Tools -VM $MyVM

$Credential = Get-Credential -Message "Credential for this VM ($MyVM)"

$MyScript =  @'

ipconfig

'@

$Output = Invoke-VMScript -vm $MyVM -guestUser $Credential.UserName -guestpassword $Credential.Password -scripttype powershell -scripttext $MyScript

Write-Host $Output

Thank you,

Regards

Please, visit my blog http://www.purplescreen.eu/
0 Kudos
Marmotte94
Enthusiast
Enthusiast

But Did you try to upgrade with VUM ?

Thank you.

Please, visit my blog http://www.purplescreen.eu/
0 Kudos
Dabosa
Contributor
Contributor

Forgive my incompetence, I'm new to scripting. I don't see how this helps me run "setup /c" on all my VMs...

My goal is to uninstall vmware tools on these machines specifically with the "/c" switch.

I'm wondering how to best go about in accomplishing this. And how go get it working.

So far I haven't been able to run "setup /c" remotely on any VM. And as previously mentioned I think that is because this results in a popup requiring a manual "OK"-click. I want to know if there is a way to run "setup /c" remotely.

Thanks in advance

0 Kudos
Gidrakos
Hot Shot
Hot Shot

Have you contacted VMware support to see if anyone knows of the old vmware-tools installer and whether or not it has a silent uninstall switch?

Unfortunately, as far as I know, the only way to write a script that will handle a popup window and be able to pass it would be VB and require that you run the script while logged in so File Explorer can work properly.

If it's a setup.msi and not .exe, you can always try out the Universal Silent Switch Finder to see if it can pull anything out of the setup, but it's doubtful. Universal Silent Switch Finder Download (Softpedia)

0 Kudos
Dabosa
Contributor
Contributor

Yes, but since the tools version is so old you cannot upgrade to the latest. The issue might be due to the original installation files missing in the path it's looking for.

0 Kudos
estanev
Enthusiast
Enthusiast

Is it a mixed environment with 32 and 64-bit OS-s? According to the VMware Knowledge Base :

  • For 32 bit guest operating systems: setup /c
  • For 64 bit guest operating systems: setup64 /c

My suggestions is to move/re-post your request here VMware PowerCLI

0 Kudos