Disable Game Mode on Windows devices using Intune

Disable Game Mode on Windows devices using Intune
Disable Game Mode on Windows devices using Intune

When you activate Game Mode, Windows prioritizes the gaming experience by allocating system resources to games. This enhances the smoothness and quality of your gaming experience.

Several background actions occur when you enable Game Mode. First, it prevents Windows updates from installing drivers and displaying restart notifications. Additionally, it adjusts the frame rate to optimize gaming performance.

However, it’s often best to keep this setting turned off in an enterprise environment. This blog post will explore how to disable Game Mode using Intune.

To do this, we will create two registry entries, “AllowAutoGameMode” and “AutoGameModeEnabled,” under HKEY_CURRENT_USER\SOFTWARE\Microsoft\GameBar. We’ll achieve this by deploying a PowerShell script to end-user devices using Win32 app deployment through Intune.

STEP 1 – Registry Keys to Disable Game Mode

To disable Game Mode on Windows 10 or 11 using Intune, ensure that both “AllowAutoGameMode” and “AutoGameModeEnabled” are of type REG_DWORD, and their values are set to 0.

STEP 2 – Create a Powershell script

  1. Create a Powershell script using the two lines of code below. For example Gamemode_O.ps1
  2. Place the PowerShell script in a dedicated folder. For example: C:\GameOff_O. Ensure no other files or folders are inside the C:\GameOff_O directory, apart from the Gamemode_O.ps1 file.


New-ItemProperty -Path HKCU:\Software\Microsoft\GameBar -Name 'AllowAutoGameMode' -Value '0' -Type DWORD -Force

New-ItemProperty -Path HKCU:\Software\Microsoft\GameBar -Name 'AutoGameModeEnabled' -Value '0' -Type DWORD -Force

STEP 3 – Create IntuneWin File

You can follow the below steps to create .IntuneWin file that will be used for the deployment.

  • Create an empty folder, for example, C:\output, or anywhere else.
  • Download Microsoft Win32 Content Prep Tool. It’s a zip file; therefore extract its contents into a folder.
  • Repackage the application folder C:\GameOff_O to .intunewin file using IntuneWinAppUtil.exe.

Use the below command to create an Intunewin file:

IntuneWinAppUtil.exe -c <setup_folder> -s <setup_file> -o <output_folder>
  • <setup_folder> = Provide the location C:\GameOff_O
  • <setup_file> = Gamemode_O.ps1
  • <output_folder> = C:\Output


.\IntuneWinAppUtil.exe -c C:\GameOff_O -s GameMode_O.ps1 -o c:\output
Create IntuneWin File
Create IntuneWin File

Once the command has finished, you can verify the creation of the .intunewin file in the C:\Output folder. As seen in the following steps, we will use this .intunewin file to set up the Win32 app deployment.

For more details about creating an Intunewin file, please refer to the post: How to create an IntuneWin file.

STEP 4 – Create App deployment on Intune

Now, we have an app packaged into the Intunewin file, Let’s check the deployment steps:

  • Sign in to the Intune admin center.
  • Click on Apps and then click on All Apps.
  • Click on + Add and Select Windows app (Win32) from the app type.

App Information Tab

Click on Select app package file and browse to .Intunewin file. Provide Information in below mandatory fields. The rest of the fields are optional but useful for application documentation and troubleshooting issues.

  • Name: GameMode_Off_Settings
  • Description: GameMode_Off_Settings
  • Publisher: MS-Custom

Program Tab

Provide the Install command, uninstall commandInstall behavior, and Device restart behavior. Click on Next to proceed.

  • Install command:  powershell.exe -Executionpolicy Bypass -File .\Gamemode_O.ps1
  • Uninstall command: powershell.exe -Executionpolicy Bypass -File .\Gamemode_O.ps1
  • Install behavior: User
  • Device restart behavior: No specific Action

Requirements Tab

You can specify the requirements that devices must meet to deploy the app. If your devices mix 32-bit and 64-bit types, check the boxes for 32-bit and 64-bit in the Operating system architecture drop-down. Else, go with 64-bit.

  • Operating System Architecture: 64-bit
  • Minimum operating system: Select the minimum OS requirement for this deployment.

Detection Rules

We’ll use a custom detection script to ensure that both registry keys exist and have their values set to 0. Create a PowerShell script with the following code and save it on your device. You can choose any name for this PowerShell script file; for example, call it GamekeysDetect.ps1.


$Path1 = "HKCU:\SOFTWARE\Microsoft\GameBar"
$Name1 = "AllowAutoGameMode"
$Type1 = "REG_DWORD"
$Value = "0"
$Path2 = "HKCU:\SOFTWARE\Microsoft\GameBar"
$Name2 = "AutoGameModeEnabled"
$Type2 = "REG_DWORD"
Try {
    $Registry1 = Get-ItemProperty -Path $Path1 -Name $Name1 -ErrorAction Stop | Select-Object -ExpandProperty $Name1
    $Registry2 = Get-ItemProperty -Path $Path2 -Name $Name2 -ErrorAction Stop | Select-Object -ExpandProperty $Name2
    If ($Registry1 -eq $Value -and $Registry2 -eq $Value){
        Write-Output "Detected"
        Exit 0
   Exit 1
Catch {
    Exit 1
  • From the Detection rules page, select Use a custom detection script as the Rule format, and in the Script File field, specify GamekeysDetect.ps1.
Use a custom detection script
Use a custom detection script

Assignments Tabs

Select Add groups and opt for an Entra security group containing Windows 10/11 devices or Entra ID users. Adding devices to the group and targeting them is recommended for a controlled deployment. Once testing proves successful, you can expand the deployment by including additional devices in the group.

Review + Create

Review the deployment and click on Create to start the deployment process.

STEP 5 – Monitoring the Deployment Progress

You can follow the below steps to monitor the installation:

  • From the Microsoft Intune admin center >Apps > All apps. Click on the deployment and check the Overview page, which will show the deployment status.

Sync Intune Policies

The device check-in process might not begin immediately. If you’re testing this policy on a test device, you can manually kickstart Intune sync from the device itself or remotely through the Intune admin center.

Alternatively, you can use PowerShell to force the Intune sync on Windows devices. Restarting the device is another way to trigger the Intune device check-in process.

End-user Experience

Disable Game mode Policy applied
Disable Game mode Policy applied
  • Once the script execution is finished, you will find two REG_DWORD registry entries, AllowAutoGameMode and AutoGameModeEnabled, created under the HKEY_CURRENT_USER\SOFTWARE\Microsoft\GameBar registry key, and both of their values will be set to 0.
Disable Game mode registry entries
Disable Game mode registry entries

1 thought on “Disable Game Mode on Windows devices using Intune”

  1. I used this to successfully disable Gamebar under a specific user but I am getting failure errors under the bulk of the users. Any idea why this would occur? The error code given is 0x800704EC


Leave a Comment