VMware Cloud Community
fn86
Contributor
Contributor

Uninstall VMWare Tools

Hi, I'm searching for a PowerCLI script that i can use to uninstall vmware tools on a specific machine.

The reason for this is because we're migrating to Hyper-V, and this requires that you remove vmware tools on the machine you want to convert.

We have a lot of VM's running, so it would save me a lot of time by doing this by PowerCLI .

0 Kudos
4 Replies
aerodevil
Hot Shot
Hot Shot

Xtravirt has a oneliner for dismounting the tools at http://xtravirt.com/powercli-vmware-tools-one-liners

(Get-VM | Get-View | Where {$_.Runtime.ToolsInstallerMounted}) | % {Dismount-Tools -VM $_.Name}

You could use this to at least dismount them and then use Invoke-Script to run a command to remove the application.  Perhaps something like the following.

http://stackoverflow.com/questions/113542/how-can-i-uninstall-an-application-using-powershell

As he says in the post.  YMMV

I may be able to find some time to try this out later today for windows systems.

Josh Atwell @Josh_Atwell http://www.vtesseract.com http://github.com/joshatwell/
0 Kudos
AlbertWT
Virtuoso
Virtuoso

Hi,

How about the script to uninstall the VMware tool VSS component only ?

is it possible ?

/* Please feel free to provide any comments or input you may have. */
0 Kudos
mattboren
Expert
Expert

Hello, AlbertWT-

Yes, you should be able to remove certain modules using the "REMOVE" parameter.  See the VMware KB about this and other parameters to the VMware Tools installer at http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=200039....

It might be in the form of an upgrade (possibly even an "upgrade" using the same version of the Tools installer, just specifying which modules to ADDLOCAL and which to REMOVE?), but looks like it should work fine.

0 Kudos
AlbertWT
Virtuoso
Virtuoso

Thanks for the assistance Matt,

Now I'll try to script that in powershell and hoping that it can be done to execute it in bulk.

Cheers,

Albert

/* Please feel free to provide any comments or input you may have. */
0 Kudos