Setup Prod Offscrub -

Do not run OffScrub on domain controllers or SQL servers without overrides.

When done correctly, OffScrub can significantly reduce memory and CPU overhead on VDI/RDSH hosts, sometimes improving user density by 15–25%. When done wrong, it can take down a production farm in minutes. setup prod offscrub

$tasksToDisable = @( "Microsoft\Windows\DiskDiagnostic*", "Microsoft\Windows\Power Efficiency Diagnostics*" ) Do not run OffScrub on domain controllers or

Why would you do this in production? To , improve session density, or eliminate application conflicts on shared servers. However, running OffScrub incorrectly in production can break critical services, crash applications, or orphan user sessions. foreach ($svc in $servicesToStop) if (Get-Service -Name $svc

foreach ($svc in $servicesToStop) if (Get-Service -Name $svc -ErrorAction SilentlyContinue) Stop-Service $svc -Force Set-Service $svc -StartupType Disabled Write-Host "Disabled: $svc"

If you manage a Windows environment—especially one involving Remote Desktop Services (RDS), Citrix, or VMware Horizon—you’ve likely heard of OffScrub . It’s a powerful script from Microsoft’s SysInternals suite (specifically part of PSExec and the Windows Assessment Toolkit) used to selectively disable or stop non-essential background processes, services, and scheduled tasks.