Thanks I m going to use it .by mistake I used uninstalling 11.2
pits actually uninstalling 6.5 power cli .i will use what YU suggested.
How can you uninstall 11.2.0 with the msiexec command?
That is not installed via an MSI package
by mistake i mentioned 11.2 .sorry about it.
i wanted to uninstall 6.5 to install 11.2 .
i was looking for some powershell command to uninstall 6.5 forcefully .
but even powershell is outdatdon this system.
everything is outdated on these systems
Now iamthinking to first upgrade powershell to 6.1 and check if there is some command which can uninstall 6.5 powercli.
If it is a PowerCLI version that is installed with a MSI, you will still need to do the uninstall with MsiExec.
You can call MsiExec from any version of PowerShell, but it will still be a MsiExec command.
Did you also try with
Get-WmiObject -Class win32_product -Filter "Name LIKE '%PowerCLI%'"
$app has powercli .its just that uninsatall function did not uninstall it .
if i move powercli 6.5 modules away from $pshome
and move new modules(11.2) to this location .
will it work??
Not too sure about that, there are some .Net files that came with the installation.
They need to be dropped/removed.
You don't see anything under Programs and Features in the Control Panel?
i will let you know as right now it should be deployed at mass level on different configuration windows machine .
desired configuration needed
powershellcore :which i tested will stay along with old powershell version and no reboot is needed .
powercli11.2:which needed uninstalltionof old powercli and that the step where iam stuck .
Yes, on a Windows box you can have PS v5.1 and v6, side-by-side.
i wish it were the case with powercli also .howeveriam unable to uninsatll powercli 6.5 .i will check again .
Btw, that MsiExec 1612 error means that MsiExec can't find the MSI file from which the product was installed.
Could you try reinstalling that PowerCLI 6.5 version from the MSI file.
And then do the uninstall with your earlier code.