windows powershell

Configure Data Deduplication on Windows Server 2012 R2

In this tutorial we will show you a fast and easy way to configure Data Deduplication via Powershell.

At first we need to add role for deduplication:

Import-Module ServerManager
Add-WindowsFeature -name FS-Data-Deduplication
Import-Module Deduplication

Now we need to enable deduplication (this time on E: drive).

Enable-DedupVolume E: -UsageType Default

If you are planning to make deduplication for Hyper-V machines storages, run this command:

Enable-DedupVolume E: -UsageType HyperV

Now we need to set the minimum age for files (days before the deduplication starts).

Set-Dedupvolume E: -MinimumFileAgeDays 20

If you want, you can add a folder for deduplication

Set-DedupVolume –Volume "E:" -ExcludeFolder "E:\temp"

Now set the minimum size for file:

Set-DedupVolume –Volume "E:" -MinimumFileSize "32768"

At this step we need to disable deduplication for files in use:

Set-DedupVolume –Volume "E:" -OptimizeInUseFiles:$False
Set-DedupVolume –Volume "E:" -OptimizePartialFiles:$False

To get the list of deduplication processes run the following command:


To get deduplication schedule run:


If you want to add a new task, run this command — New-DedupSchedule

Here is an example on how to add new optimization task:

New-DedupSchedule –Name "ThroughputOptimization" –Type Optimization –Days on,Tues,Wed,Thurs,Fri,Sunday –Start 00:00 –DurationHours 8 -Priority Normal

Now let`s take a closer look on this example:

Name — new task name
Type — task type (Optimization/GarbageCollection/Scrubbing)
Scrubbing — recovers damaged data
GarbageCollection — free up some space
Optimization — deduplication and data compression
Days in what days should the task run?
Start at what time?
DurationHours how many hours the task will be on run

To view current deduplication status run command:


You must get something like this:

Enabled   UsageType    SavedSpace    SavingsRate   Volume
——-           ———             ———-             ————           ——
True          Default          76.94 GB             66 %             E:

In this example, deduplication reduced space from 65GB to 354MB.

And that`s great efficiency! Easy set ups, guys! In newer article we also took a look on data deduplication in newer Windows Server 2016 version.

You may also like:

Add Calendar Permissions in Office 365 via PowerSh... This is a tutorial on how to add calendar permissions in Office 365 for your users via PowerShell. You can add the permissions on a specific user’s ma...
Removing Old and Unused Drivers from Driver Store ... Each time you install or update your device driver, Windows OS (since Vista) continues to store the old version of the driver in the system Driver Sto...
How to transfer FSMO Roles From a Failed Domain Co... In case domain controller, which owns FSMO (Flexible Single Master Operation) roles, is fail (virus attack, fatal software problems or catastrophic ha...
LZX — new Windows 10 NTFS compression algorithm Many of you may know that NTFS file system used by Windows 10 already has a built-in NTFS compression feature. But in Windows 10 Microsoft has added c...
Config Remote Desktop Easy Print on Server 2012 R2 TS Easy Print technology was first introduced in Windows Server 2008 as an alternative to the use of traditional printing subsystem on Remote Desktop ...

Add Your Comment