LLI Wiki — My Digital Knowledge Base

Disable fair sharing on a Remote Desktop server

PowerShell commands to disable CPU, disk and network fair sharing on a Windows Server Remote Desktop session host.

On a Windows server that hosts Remote Desktop sessions, fair sharing (fair sharing of CPU, disk and network resources) can cause slow or frozen sessions. The commands below disable each of these fair-sharing features and show how to check the configuration.

Disable CPU fair sharing

$temp = (gwmi win32_terminalservicesetting -N "root\cimv2\terminalservices")
$temp.enableDFSS = 0
$temp.put()

Disable disk fair sharing

$temp = (gwmi win32_terminalservicesetting -N "root\cimv2\terminalservices")
$temp.enableDiskFSS = 0
$temp.put()

Disable network fair sharing

$temp = (gwmi win32_terminalservicesetting -N "root\cimv2\terminalservices")
$temp.enableNetworkFSS = 0
$temp.put()

Check the configuration

get-itemproperty "hklm:\SYSTEM\CurrentControlSet\Control\Session Manager\Quota System"
get-itemproperty "hklm:\SYSTEM\CurrentControlSet\Services\TSFairShare\Disk"
get-itemproperty "hklm:\SYSTEM\CurrentControlSet\Services\TSFairShare\NetFS"
Mastodon LLIMastodon SocialFosstodon