Skip to content
This repository was archived by the owner on May 28, 2021. It is now read-only.

Commit b3b1223

Browse files
committed
Disable Game mode as part of "EnableXboxFeatures", resolves #205
1 parent 0129698 commit b3b1223

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Win10.psm1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2597,7 +2597,7 @@ Function InstallWindowsStore {
25972597
Get-AppxPackage -AllUsers "Microsoft.WindowsStore" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
25982598
}
25992599

2600-
# Disable Xbox features
2600+
# Disable Xbox features - Not applicable to Server
26012601
Function DisableXboxFeatures {
26022602
Write-Output "Disabling Xbox features..."
26032603
Get-AppxPackage "Microsoft.XboxApp" | Remove-AppxPackage
@@ -2606,14 +2606,15 @@ Function DisableXboxFeatures {
26062606
Get-AppxPackage "Microsoft.XboxGameOverlay" | Remove-AppxPackage
26072607
Get-AppxPackage "Microsoft.XboxGamingOverlay" | Remove-AppxPackage
26082608
Get-AppxPackage "Microsoft.Xbox.TCUI" | Remove-AppxPackage
2609+
Set-ItemProperty -Path "HKCU:\Software\Microsoft\GameBar" -Name "AutoGameModeEnabled" -Type DWord -Value 0
26092610
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_Enabled" -Type DWord -Value 0
26102611
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR")) {
26112612
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR" | Out-Null
26122613
}
26132614
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR" -Name "AllowGameDVR" -Type DWord -Value 0
26142615
}
26152616

2616-
# Enable Xbox features
2617+
# Enable Xbox features - Not applicable to Server
26172618
Function EnableXboxFeatures {
26182619
Write-Output "Enabling Xbox features..."
26192620
Get-AppxPackage -AllUsers "Microsoft.XboxApp" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
@@ -2622,6 +2623,7 @@ Function EnableXboxFeatures {
26222623
Get-AppxPackage -AllUsers "Microsoft.XboxGameOverlay" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
26232624
Get-AppxPackage -AllUsers "Microsoft.XboxGamingOverlay" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
26242625
Get-AppxPackage -AllUsers "Microsoft.Xbox.TCUI" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
2626+
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\GameBar" -Name "AutoGameModeEnabled" -ErrorAction SilentlyContinue
26252627
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_Enabled" -Type DWord -Value 1
26262628
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR" -Name "AllowGameDVR" -ErrorAction SilentlyContinue
26272629
}

0 commit comments

Comments
 (0)