Block Chrome and Edge browser extensions Windows 10 and above devices
  • 13 Aug 2024
  • 1 Minute to read
  • PDF

Block Chrome and Edge browser extensions Windows 10 and above devices

  • PDF

Article summary

The following PowerShell scripts helps the IT Admins to block Chrome and Edge browser extensions on their managed Windows 10 and above devices.

  1. Create a file on your desktop, for example, block_edge_extensions.ps1 and block_chrome_extensions.ps1, and open it in a text editor like notepad++

  2. Copy the contents below to the respective file or click Chrome / Edge to download the files.

    1. While uploading the script(s) on the Scalefusion dashboard please select the Execution Level as Device.

Block Chrome Extensions

#Once the script below is run successfully, users cannot install the specified extensions. If the extensions are already installed, they will be blocked, and the users will be restricted from enabling them.

$ExtensionBlockRegKey = 'HKLM:\SOFTWARE\Policies\Google\Chrome\ExtensionInstallBlocklist'
$ChromeRegKey = 'HKLM:\SOFTWARE\Policies\Google\Chrome'
$ExtensionRegKey = 'ExtensionInstallBlocklist'
$RegName = '1'

$exists = Test-Path $ExtensionBlockRegKey
if (!$exists) {
    New-Item -Path $ChromeRegKey -Name $ExtensionRegKey -Force | Out-Null
}
New-ItemProperty -Path $ExtensionBlockRegKey -Name $RegName -Value "*" -PropertyType 'String' -Force | Out-Null

Block Edge Extensions

#Once the script below is run successfully, users cannot install the specified extensions. If the extensions are already installed, they will be blocked, and the users will be restricted from enabling them.

$ExtensionBlockRegKey = 'HKLM:\SOFTWARE\Policies\Microsoft\Edge\ExtensionInstallBlocklist'
$EdgeRegKey = 'HKLM:\SOFTWARE\Policies\Microsoft\Edge'
$ExtensionRegKey = 'ExtensionInstallBlocklist'
$RegName = '1'

$exists = Test-Path $ExtensionBlockRegKey
if (!$exists) {
    New-Item -Path $EdgeRegKey -Name $ExtensionRegKey -Force | Out-Null
}
New-ItemProperty -Path $ExtensionBlockRegKey -Name $RegName -Value "*" -PropertyType 'String' -Force | Out-Null

Note:

Follow our guide to upload & publish the PowerShell script using Scalefusion Dashboard.

Please note that to use the PowerShell scripts, the Scalefusion MDM Agent Application must be installed on the device(s). Please follow our guide to publish and install the Scalefusion MDM Agent Application.

Note:

  1. The scripts and their contents are sourced from various albeit authenticated Microsoft sources and forums.

  2. Please validate the scripts on a test machine before deploying them on all your managed devices.

  3. Scalefusion has tested these scripts, however, Scalefusion will not be responsible for any loss of data or system malfunction that may arise due to the incorrect usage of these scripts.


Was this article helpful?