Setup Prod Offscrub 〈Web〉
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.
Write-Host "Starting Production OffScrub - $(Get-Date)"
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. setup prod offscrub
Do not run OffScrub on domain controllers or SQL servers without overrides.
foreach ($taskPath in $tasksToDisable) Get-ScheduledTask -TaskPath $taskPath To , improve session density, or eliminate application
You can start with the (part of the Windows ADK) or build your own. Basic production-safe template: # ProductionOffScrub.ps1 # Run as SYSTEM or Administrator $servicesToStop = @( "WSearch", # Windows Search "SysMain", # Superfetch "DiagTrack", # Diagnostics Tracking "dmwappushservice" )
Use Infrastructure as Code (Terraform + Ansible) to version-control your OffScrub configuration. Treat your optimizations like application code—with tests and rollbacks. Have you deployed OffScrub in production? Share your exclusion list or horror story in the comments below. # Windows Search "SysMain"
Get-Service | Where-Object $_.StartType -eq "Disabled" | Export-Clixml -Path "C:\OffScrubBackup\services_before.xml" Restore script: