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.
Thanks in advance!
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 = @'
$Output = Invoke-VMScript -vm $MyVM -guestUser $Credential.UserName -guestpassword $Credential.Password -scripttype powershell -scripttext $MyScript
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
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)