Skip to content

Instantly share code, notes, and snippets.

@nicksterx
Last active November 2, 2023 01:47
Show Gist options
  • Save nicksterx/8cabfd5c696bd23f8ab4f11ca112cb26 to your computer and use it in GitHub Desktop.
Save nicksterx/8cabfd5c696bd23f8ab4f11ca112cb26 to your computer and use it in GitHub Desktop.

Revisions

  1. nicksterx revised this gist Apr 20, 2017. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions disableHTTP2OnWindows10And2016.ps1
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,7 @@
    #2017-20-04
    #Disable HTTP/2 Protocol on Windows 10 and Windows 2016 Desktops
    #With some web browsers, you might encounter the error ERR_SPDY_PROTOCOL_ERROR when accessing a Windows 10 VADC or Windows 2016.
    #You can prevent this error by disabling the HTTP/2 protocol on the desktop.
    #http://stackoverflow.com/a/31714461/2375884
    #https://pubs.vmware.com/horizon-7-view/index.jsp?topic=%2Fcom.vmware.view-agent.directconnectionplugin.doc%2FGUID-BE0738EC-E35E-4215-8E1E-1F08F911D592.html

  2. nicksterx revised this gist Apr 20, 2017. No changes.
  3. nicksterx created this gist Apr 20, 2017.
    22 changes: 22 additions & 0 deletions disableHTTP2OnWindows10And2016.ps1
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    #2017-20-04
    #Disable HTTP/2 Protocol on Windows 10 and Windows 2016 Desktops
    #http://stackoverflow.com/a/31714461/2375884
    #https://pubs.vmware.com/horizon-7-view/index.jsp?topic=%2Fcom.vmware.view-agent.directconnectionplugin.doc%2FGUID-BE0738EC-E35E-4215-8E1E-1F08F911D592.html

    $registryPath = "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters"

    $nameEnableHttp2Tls = "EnableHttp2Tls"
    $typeEnableHttp2Tls = "REG_DWORD"
    $valueEnableHttp2Tls = "0"

    $nameEnableHttp2Cleartext = "EnableHttp2Cleartext"
    $typeEnableHttp2Cleartext = "REG_DWORD"
    $valueEnableHttp2Cleartext = "0"

    If(!(Test-Path $registryPath)){
    New-ItemProperty -Path $registryPath -Name $nameEnableHttp2Tls -Value $valueEnableHttp2Tls -PropertyType $typeEnableHttp2Tls
    New-ItemProperty -Path $registryPath -Name $nameEnableHttp2Cleartext -Value $valueEnableHttp2Cleartext -PropertyType $typeEnableHttp2Cleartext
    } else {
    Set-ItemProperty -Path $registryPath -Name $nameEnableHttp2Tls -Value $valueEnableHttp2Tls -PropertyType $typeEnableHttp2Tls
    Set-ItemProperty -Path $registryPath -Name $nameEnableHttp2Cleartext -Value $valueEnableHttp2Cleartext -PropertyType $typeEnableHttp2Cleartext
    }