I have a Baseline that forces Google Chrome to Install Updates. And I wanted to Edit Configuration Item to change the Embedded Scripts that are the Check for Chrome Version and if not version "X" then remediates.
The Discovery Scripts check for Chrome Version, if Chrome not installed or above version defines then return True.
Remediation Script runs googleupdate.exe with proper switches.
Then i would need to edit 2 Descovery Scripts to update the Baseline so, I wrote this up to edit said Configuration Item.
There amy be a better way but this is what we are using.
FYI the Remediation Script to install latest Google Chrome is this.
System Remediation Script
User Remediation Script
Also a handy way to convert any User Based Google Chrome installs to System Based Google Chrome installs.
The Discovery Scripts check for Chrome Version, if Chrome not installed or above version defines then return True.
Remediation Script runs googleupdate.exe with proper switches.
Then i would need to edit 2 Descovery Scripts to update the Baseline so, I wrote this up to edit said Configuration Item.
Code:
$oldVersion = "119.0.6045.160"
$newversion = "119.0.6045.160"
$CMPSSuppressFastNotUsedCheck = $true
$Chrome = Get-CMConfigurationItem -Name "Name of the Config Item"
$CMPSSuppressFastNotUsedCheck = $false
$ChromeXML = $Chrome.SDMPackageXML
$NewXML = $ChromeXML -Replace $OldVersion,$NewVersion
Set-CMConfigurationItem -InputObject $Chrome -DigestXml $NewXML
There amy be a better way but this is what we are using.
FYI the Remediation Script to install latest Google Chrome is this.
System Remediation Script
Code:
If("C:\Program Files (x86)\Google\Update\GoogleUpdate.exe"){
& "C:\Program Files (x86)\Google\Update\GoogleUpdate.exe" /Install "appguid={8A69D345-D564-463C-AFF1-A69D9E530F96}&appname=Google%20Chrome&needsadmin=True" /Silent
}
Code:
$UserProfile = (Get-WMIObject -class Win32_UserProfile | Where {(!$_.Special) -and ($_.Loaded)}).LocalPath
##If you run this with "True" on a user install, it installs it again for the system
If("$UserProfile\AppData\Local\Google\Update\GoogleUpdate.exe"){
& "$UserProfile\AppData\Local\Google\Update\GoogleUpdate.exe" /Install "appguid={8A69D345-D564-463C-AFF1-A69D9E530F96}&appname=Google%20Chrome&needsadmin=True" /Silent
}