change GDIProcessHandleQuota to 20000 (#2780)

This commit is contained in:
Aleksandr Chebotov
2021-02-24 18:48:49 +03:00
committed by GitHub
parent 5afe6fcc4e
commit 09ea8edb54
4 changed files with 21 additions and 1 deletions

View File

@@ -0,0 +1,9 @@
# https://docs.microsoft.com/en-us/windows/win32/sysinfo/gdi-objects
# This value can be set to a number between 256 and 65,536
$defaultValue = 20000
Write-Host "Set the GDIProcessHandleQuota value to $defaultValue"
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows" -Name GDIProcessHandleQuota -Value $defaultValue
Set-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows NT\CurrentVersion\Windows" -Name GDIProcessHandleQuota -Value $defaultValue
Invoke-PesterTests -TestFile "WindowsFeatures" -TestName "GDIProcessHandleQuota"