Skip to the article
Browser Rules Help
Help centre
Browser Rules help

Set up Browser Rules in Chrome and Edge, managed from the admin console.

Using the admin console / Getting started

Deploy: PowerShell script

A script for Intune platform scripts, Configuration Manager or remote management tools.

In Intune, add it under Devices, Scripts and remediations, Platform scripts, with Run this script using the logged on credentials set to No and Run script in 64 bit PowerShell Host set to Yes. It can be run again safely.

browser-rules-console.ps1
# Browser Rules: install the extension and connect it to your organisation's console.
# Run as SYSTEM or an administrator: it writes to HKLM, which people can't change.
$id = "bjhkclliijjffonmofmimpebcbigigem"
$update = "https://clients2.google.com/service/update2/crx"
$key = "BR-ABCDE-FGHJK-LMNPQ-RSTUV"

foreach ($browser in @("Google\Chrome", "Microsoft\Edge")) {
  $root = "HKLM:\SOFTWARE\Policies\$browser"

  # Force-install the extension, in the next free entry of the list.
  $list = "$root\ExtensionInstallForcelist"
  New-Item -Path $list -Force | Out-Null
  $entries = (Get-Item $list).Property
  if (-not ($entries | Where-Object { (Get-ItemPropertyValue $list $_) -like "$id*" })) {
    $next = 1; while ($entries -contains "$next") { $next++ }
    New-ItemProperty -Path $list -Name "$next" -Value "$id;$update" -PropertyType String -Force | Out-Null
  }

  # The enrolment key: the browser connects to the console, and takes its policies from there.
  $policy = "$root\3rdparty\extensions\$id\policy"
  New-Item -Path $policy -Force | Out-Null
  New-ItemProperty -Path $policy -Name "enrolmentKey" -Value $key -PropertyType String -Force | Out-Null
}
Still stuck? We're happy to help.[email protected]