Category filter

Script to uninstall any version of Chrome on Windows

Admins might want to uninstall Google Chrome from their devices for various reasons. For instance, you would want to remove the existing browser, or specifically, Chrome browser, after switching to another browser to ensure the users widely use the newly chosen browser or to free up space. Alternatively, you might need to uninstall a specific version of Chrome because it’s reported to have issues across the devices. In any case, trying to uninstall Chrome manually from each device is hectic and cumbersome. With the Execute Custom Script action, you can execute custom scripts to uninstall a specific version or all versions of Google Chrome present across your Windows device.

Disclaimer:

The sample scripts provided below are adapted from third-party open-source sites.

PowerShell script to uninstall a specific version of Chrome

Output after uninstalling a specific version of Chrome

Replace Enter the app version with the corresponding version of Chrome that you want to uninstall. For example, if you want to uninstall the Chrome app version 111.0.5563.65:


$version = "111.0.5563.65"
$chrome = Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -like "*Google Chrome*"} | Where-Object {$_.Version -eq $version}
if ($chrome) {
$chrome.Uninstall()
Write-Output "Google Chrome successfully uninstalled"
} else {
Write-Host "Chrome version $version not found"
}

If the specified Chrome version is not found on the device, the following message will be displayed, “Chrome *specified version* not found” and the Chrome app present on the device won’t be removed.

PowerShell script to uninstall Chrome irrespective of its app version

This script uses the Windows Management Instrumentation (WMI) to uninstall Google Chrome from a windows device irrespective of its version.

Output after the execution of the PowerShell script to remove any version of Chrome on Windows

Notes:

  • It is recommended to manually validate the script execution on a system before executing the action in bulk.
  • Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.

  • Sample Script Repository