Skip to content

Instantly share code, notes, and snippets.

@debold
Created March 8, 2022 14:45
Show Gist options
  • Save debold/ac5a30617ef6ce1489770620d2240dbe to your computer and use it in GitHub Desktop.
Save debold/ac5a30617ef6ce1489770620d2240dbe to your computer and use it in GitHub Desktop.
Change the dedup schedule for Hyper-V (clusters) to run outside business hours
# Reference: https://docs.microsoft.com/en-us/windows-server/storage/data-deduplication/advanced-settings
Set-DedupSchedule -Name BackgroundOptimization -Enabled $false
Set-DedupSchedule -Name PriorityOptimization -Enabled $false
Get-DedupSchedule -Type GarbageCollection | ForEach-Object { Remove-DedupSchedule -InputObject $_ }
Get-DedupSchedule -Type Scrubbing | ForEach-Object { Remove-DedupSchedule -InputObject $_ }
New-DedupSchedule -Name "NightlyOptimization" -Type Optimization -DurationHours 11 -Memory 100 -Cores 100 -Priority High -Days @(1, 2, 3, 4, 5) -Start (Get-Date "2016-08-08 19:00:00")
New-DedupSchedule -Name "WeeklyGarbageCollection" -Type GarbageCollection -DurationHours 23 -Memory 100 -Cores 100 -Priority High -Days @(6) -Start (Get-Date "2016-08-13 07:00:00")
New-DedupSchedule -Name "WeeklyIntegrityScrubbing" -Type Scrubbing -DurationHours 23 -Memory 100 -Cores 100 -Priority High -Days @(0) -Start (Get-Date "2016-08-14 07:00:00")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment