Archive for category Browsers

PowerShell: Remove Google Chrome (any version)

The following PowerShell script will allow you to remove any installed version of Google Chrome.

Function UninstallChrome() {
    $app = get-wmiobject Win32_Product | Where-Object {$_.Name -eq "Google Chrome"}
    $removeChrome = $app.IdentifyingNumber msiexec /x
    $removeChrome /q
 }
 
# If chrome is running then close the process and uninstall it
 If (Get-Process chrome -ErrorAction SilentlyContinue) {
    # Chrome is running
    # Stop chrome process
    Stop-Process -Name chrome -Force

    # Now uninstall chrome
    UninstallChrome
 } Else {
     # Chrome is not running…
     # Uninstall chrome
     UninstallChrome
 } 

, , , , ,

Leave a comment