Add a Registry Key to Windows 11 Using Intune

In this blog post, we’ll walk you through the steps to add a registry key to Windows 11 using Intune.

As more and more businesses move towards cloud-based solutions, the need for efficient and centralized device management has become increasingly important. Microsoft Intune is a cloud-based service that allows administrators to manage devices and applications from a single platform, and it can be used to add registry keys to Windows 11 devices.

To apply registry keys to Intune-managed machines, we need to use PowerShell cmdlets and push them to managed machines using a PowerShell script.

PowerShell Script

The following script will add a registry setting to a Windows 10 \ 11 machine. Use the variables to add the registry key details. The script also checks if the key exists before creating it.

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

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

Add Script to Intune

To deploy the key to machines,

Open the Intune console

Click on Devices

Under Policy, click on Scripts

Click Add

Name the script and click next to the configuration part.

Upload the script

Set Yes to Run this script using logged-on credentials

Select No to Enforce script signature check

Use Yes to Run script in 64-bit PowerShell Host

Assign the script to users or groups and wait for the policy to apply.

Watch the YouTube version of this blog post

Success! You're on the list.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.