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...
How to Get List of Installed Programs in Windows 1... In this simple guide, we will show you two different ways of how to get a list of installed programs in Windows 10, 8 or Windows 7 using built-in comm...
Config Remote Desktop Easy Print on Windows Server... TS Easy Print technology was first introduced in Windows Server 2008 as an alternative to the use of traditional printing subsystem on Remote Desktop ...
Fix Trust relationship failed issue without domain... In this article, we will discuss the causes of Trust relationship failed error and some solutions on how to restore secure channel between the worksta...
How to copy files with BITS using PowerShell? If you use local (and global) networks, you might know that files between systems are transferring by using SMB, FTP or HTTP protocols. The problem wi...

Add Your Comment