Forum Discussion
ShehzadUIT
May 19, 2020Copper Contributor
Intune: Custom Policy Configuration: Setting fails with error: -2016281112 (Remediation failed)
i am implementing Google Chome policy and using their guidance to do that: https://support.google.com/chrome/a/answer/9102677?hl=en I have created a custom policy where i have ingested the co...
- May 20, 2020
Hi ShehzadUIT
What value are you using for HomepageLocation?
I wrote an article about managing Chrome settings and HomePage Location is one of the examples, it might be helpful for you https://www.inthecloud247.com/manage-google-chrome-settings-with-microsoft-intune/
Moe_Kinani
May 20, 2020Bronze Contributor
Are you trying to change the home page and add home button? if yes, I use this great ps and push with Intune Script, works like charm!
Otherwise, PKlapwijk, any thoughts on why the custom config policy didn't work?
Moe
#paths for chrome policy keys used in the scripts
$policyexists = Test-Path HKLM:\SOFTWARE\Policies\Google\Chrome
$policyexistshome = Test-Path HKLM:\SOFTWARE\Policies\Google\Chrome\RestoreOnStartupURLs
$regKeysetup = "HKLM:\SOFTWARE\Policies\Google\Chrome"
$regKeyhome = "HKLM:\SOFTWARE\Policies\Google\Chrome\RestoreOnStartupURLs"
$url = "https://example.com"
#setup policy dirs in registry if needed and set pwd manager
#else sets them to the correct values if they exist
if ($policyexists -eq $false){
New-Item -path HKLM:\SOFTWARE\Policies\Google
New-Item -path HKLM:\SOFTWARE\Policies\Google\Chrome
New-ItemProperty -path $regKeysetup -Name PasswordManagerEnabled -PropertyTypeDWord -Value 0
New-ItemProperty -path $regKeysetup -Name RestoreOnStartup -PropertyType Dword -Value 4
New-ItemProperty -path $regKeysetup -Name HomepageLocation -PropertyType String -Value $url
New-ItemProperty -path $regKeysetup -Name HomepageIsNewTabPage -PropertyTypeDWord -Value 0
}
Else {
Set-ItemProperty -Path $regKeysetup -Name PasswordManagerEnabled -Value 0
Set-ItemProperty -Path $regKeysetup -Name RestoreOnStartup -Value 4
Set-ItemProperty -Path $regKeysetup -Name HomepageLocation -Value $url
Set-ItemProperty -Path $regKeysetup -Name HomepageIsNewTabPage -Value 0
}
#This entry requires a subfolder in the registry
#For more then one page create another new-item and set-item line with the name -2 and the new url
if ($policyexistshome -eq $false){
New-Item -path HKLM:\SOFTWARE\Policies\Google\Chrome\RestoreOnStartupURLs
New-ItemProperty -path $regKeyhome -Name 1 -PropertyType String -Value $url
}
Else {
Set-ItemProperty -Path $regKeyhome -Name 1 -Value $url
}
- ShehzadUITMay 20, 2020Copper Contributor
Moe_Kinani ...Thanks for that. This script is definitely handy. However, the real question is that why would these custom CSPs not work?
I would understand that if i extract a setting from an ADMX XML and it doesn't work. maybe i am doing something wrong. But in this case, these are examples from Google. and millions of people have tried them. so why are they throwing an error.
- PKlapwijkMay 20, 2020MVP
Hi ShehzadUIT
What value are you using for HomepageLocation?
I wrote an article about managing Chrome settings and HomePage Location is one of the examples, it might be helpful for you https://www.inthecloud247.com/manage-google-chrome-settings-with-microsoft-intune/- ShehzadUITMay 25, 2020Copper Contributor
PKlapwijk . I am using the following value for homepage:
<enabled/><data id="HomepageLocation" value="<Our_Intranet_Page_URL"/>