There is a timer running for 16 hours (57600 seconds).
At the beginning the deduplication is started with the entered parameters and after expiration it ends.
The script starts as a task at a specific time. I also use it for garbage collection.
I can not start with the default settings under 2012R2.
Only adjust the parameters for deduplication and seconds. That's it.
Maybe it is useful for someone.
Code: Select all
### Start Deduplication Volume F+G ###
Start-DedupJob -Type Optimization -Volume F:,G: -Priority High -Memory 80
#### Start Countdown ###
Function Start-Countdown
{
Param(
[Int32]$Seconds = 57600,
[string]$Message = "Deduplication Volume F+G"
)
ForEach ($Count in (1..$Seconds))
{ Write-Progress -Id 1 -Activity $Message -Status "Waiting for $Seconds seconds, $($Seconds - $Count) left" -PercentComplete (($Count / $Seconds) * 100)
Start-Sleep -Seconds 1
}
Write-Progress -Id 1 -Activity $Message -Status "Completed" -PercentComplete 100 -Completed
}
Start-Countdown -Seconds 57600 -Message "Deduplication Volume F+G"
Stop-DedupJob -Type Optimization -Volume F:
Stop-DedupJob -Type Optimization -Volume G: