How to Disable New Copilot Preview Button With Intune

How to use Intune Remediations to disable the new Copilot Preview Button on the Windows 11 Taskbar.

In this article, I'll give you the PowerShell scripts to setup an Intune Remediation that periodically checks and disables the new Copilot button.

Create a new file called detection.ps1 and copy and paste the following code into it:

 1$regKey = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
 2$regValue = "ShowCopilotButton"
 3
 4# Check if the key/property value exists and is set to 0
 5if ((Test-Path -Path "$regKey") -and (Get-ItemPropertyValue -Path $regKey -Name $regValue) -eq 0) {
 6    # Everything is fine
 7    exit 0
 8} else {
 9    # Issue detected
10    exit 1
11}

Save that file, we will use it later.

Now create another new file and call it remediation.ps1 and copy and paste the following code into it:

 1$regKey = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
 2$regValue = "ShowCopilotButton"
 3
 4# Check if the key exists
 5if (Test-Path -Path "$regKey") {
 6    # Get the current property value
 7    $currentValue = Get-ItemPropertyValue -Path $regKey -Name $regValue
 8    # If the value is not 0, set it to 0
 9    if ($currentValue -ne 0) {
10        Set-ItemProperty -Path $regKey -Name $regValue -Value 0
11    }
12} else {
13    # If the key does not exist, create it and set it to 0
14    New-ItemProperty -Path $regKey -Name $regValue -Value 0 -PropertyType DWORD
15}

Once again, save that file and close it. We have finished building our scripts. Now to create the remediation in Intune.

Navigate to the Intune portal (https://endpoint.microsoft.com or https://intune.microsoft.com).

Starting from the left pane: click Devices -> Under Policy, click Remediations -> click Create script package

  • Give your remediation a name, like Disable Copilot Preview Button.
  • (Optional) Give your remediation a description.
  • Click Next.

Now to upload the scripts you made.

  • For Detection script file, click the Select a file button and select the detection.ps1 script we made.
  • For Remediation script file, click the Select a file button and select the remediation.ps1 script we made.
  • For Run this script using the logged-on credentials, select Yes.
  • Leave everything else default unless you have a requirement otherwise.
  • Click Next.

Select any Scope tags that are required by your environment and click Next.

Assign the remediation to whatever groups you wish.

  • After assigning a group, you can customize the schedule you would like the remediation to run on. I set this to run every hour, but you can set this to whatever you like.

Finally, review your settings and create the remediation.