Select Page

In this article, we’ll guide you through the process of adding a registry key to Windows 11 utilizing Microsoft Intune.

As businesses increasingly embrace cloud-based solutions, the necessity for streamlined and centralized device management has become more pronounced. Microsoft Intune offers a cloud-based service enabling administrators to efficiently manage devices and applications from a unified platform, including the capability to add registry keys to Windows 11 devices.

To implement registry keys on Intune-managed machines, PowerShell cmdlets are utilized and pushed to managed devices via a PowerShell script.

PowerShell Script:

Below is a script designed to add a registry setting to a Windows 10 or 11 machine. It incorporates variables to accommodate various registry key details, and additionally verifies the existence of the key before creation.

$Path = "HKCU:\Software\cpi\"
$Name = "blogname"
$value = "cpi"
$type="REG_SZ" # String

if((Test-Path -LiteralPath $path) -ne $true) { New-Item $Path -Force -ErrorAction SilentlyContinue };
New-ItemProperty -LiteralPath $path -Name $name -Value $value -PropertyType $type -Force -ErrorAction SilentlyContinue;

Adding Script to Intune:


To deploy the registry key to machines, follow these steps:

  1. Open the Intune console.
  2. Navigate to Devices.
  3. Under Policy, select Scripts.
  4. Click Add.
  5. Name the script and proceed to the configuration section.
  6. Upload the script.
  7. Select “Yes” to Run this script using logged-on credentials.
  8. Choose “No” to Enforce script signature check.
  9. Opt for “Yes” to Run script in 64-bit PowerShell Host.
  10. Assign the script to users or groups and await policy application.

By following these steps, you can seamlessly integrate registry key additions into your Windows 11 environment using Microsoft Intune, thereby enhancing device management efficiency and control.