Was just working with a client to help automate the uninstall of any version of Chrome and the installation of Chrome Enterprise. The issue they were having was that there were over 40ish versions of Chrome deployed in their environment and they wanted a seamless way to remove the old and deploy the new. They already had a tested package for Google Chrome Enterprise in their SCCM environment so the removal was really the hurtle to get past.
We looked around online and found this post which shows how to do it with PSEXEC but there is the issue of having one script to hit multiple versions since they change the build number in the folder path.
Off to PowerShell...
We used get-childitem recursively to grab the setup.exe file without having to know the build number:
$chromepath = get-childitem 'C:\Program Files (x86)\Google\' -Recurse |where-object {$_.Name -eq "Setup.exe"}
Getting the file by itself doesn't do us much good, but by specifying $chromepath.FullName, we now have a fully qualified path to the executable to be used for starting a process like below.
start-process -filepath $chromepath.fullname -argumentlist "--uninstall --multi-install --chrome --system-level --force-uninstall"
Putting the two lines together, we were able to deploy a package with the uninstaller script to the devices. With the above; it didn't matter if Chrome was open or not, it would force close it and uninstall.
To finish things off, we took the above mentioned package and created a task sequence with the uninstall happening first and then the Enterprise Chrome install as the second step. The task sequence was then deployed to the client collection limiting the amount of downtime between the removal and reinstall.
Subscribe to:
Post Comments (Atom)
Powershell Removal of any version of Chrome
Was just working with a client to help automate the uninstall of any version of Chrome and the installation of Chrome Enterprise. The issue...
-
Was just working with a client to help automate the uninstall of any version of Chrome and the installation of Chrome Enterprise. The issue...
-
I recently ran into an issue at a client site with a new install of SCCM. We deployed the SCCM agents and out of 1k plus clients, only 12 w...
No comments:
Post a Comment