How to Set Up Data Deduplication on Windows Server 2012 R2
Data Deduplication is a Windows Server 2012 R2 role service that reduces storage consumption by identifying and eliminating redundant data patterns across files stored on NTFS volumes. Unlike traditional single-instance storage, the deduplication engine works post-process — it analyses data after it has been written to disk, replaces duplicate chunks with pointers to a shared chunk store, and optionally compresses the chunk store. In production environments, deduplication commonly achieves 2:1 to 20:1 storage savings depending on the data type. File server shares, VDI repositories, and backup volumes are ideal candidates. This guide covers installation, policy configuration, optimisation scheduling, and monitoring.
Prerequisites
Data Deduplication requires Windows Server 2012 R2 Standard or Datacenter edition. The target volumes must be formatted with NTFS. Deduplication is not supported on boot volumes (typically C:), removable drives, or cluster shared volumes in all configurations. Sufficient CPU and RAM resources are needed for the deduplication job engine — at least 4 GB RAM is recommended on servers where deduplication will run on large volumes. Administrator rights are required for all configuration steps.
Step 1: Install the Data Deduplication Feature
Data Deduplication is a sub-feature of the File and Storage Services role. Install it via PowerShell:
Install-WindowsFeature -Name FS-Data-Deduplication -IncludeManagementTools
Verify installation:
Get-WindowsFeature FS-Data-Deduplication
Alternatively, install through Server Manager: Add Roles and Features → File and Storage Services → File and iSCSI Services → Data Deduplication.
Step 2: Enable Deduplication on a Volume
Enable deduplication on a file server share volume (e.g., D:) using the GeneralPurpose usage type, which is optimised for general file server workloads:
Enable-DedupVolume -Volume D: -UsageType Default
For a VDI (virtual desktop) scenario, use the HyperV usage type which optimises for VHD/VHDX files:
Enable-DedupVolume -Volume E: -UsageType HyperV
For a backup volume (Windows Server Backup target), use the Backup usage type which disables file age minimum requirements:
Enable-DedupVolume -Volume F: -UsageType Backup
Verify deduplication is enabled and review volume settings:
Get-DedupVolume -Volume D: | Format-List
Step 3: Configure Deduplication Policies
The deduplication policy controls which files are eligible for deduplication and when jobs run. By default, files must be at least 3 days old before being processed (to avoid deduplicating files that are still actively changing). Modify this minimum age:
Set-DedupVolume -Volume D: -MinimumFileAgeDays 1
Set minimum file size for deduplication (default is 32 KB; smaller files have less potential savings):
Set-DedupVolume -Volume D: -MinimumFileSize 32768
Exclude specific file types or paths from deduplication (for example, exclude database files that should not be deduplicated):
Set-DedupVolume -Volume D: -ExcludeFileType @("mdf","ldf","vhd") -ExcludeFolder @("D:Databases","D:LiveData")
Enable compression of the chunk store for additional storage savings (at the cost of increased CPU usage during deduplication jobs):
Set-DedupVolume -Volume D: -EnableChunkCompressionMode Enabled
Step 4: Configure and Schedule Deduplication Jobs
Deduplication jobs run in the background and can be scheduled to run during off-peak hours. View the current deduplication job schedule:
Get-DedupSchedule
The default schedule includes a BackgroundOptimization job that runs continuously at low priority. Modify it to run only during specific hours:
Set-DedupSchedule -Name BackgroundOptimization -Start "22:00" -DurationHours 6 -Memory 50 -Cores 50 -Priority Low
Create a dedicated weekly GarbageCollection job to reclaim space from deleted files and free chunk store references:
New-DedupSchedule -Name WeeklyGC -Type GarbageCollection -Start "01:00" -DurationHours 4 -Days Saturday -Memory 75 -Priority Normal
Create a Scrubbing job to verify the integrity of the chunk store and repair corruption:
New-DedupSchedule -Name MonthlyScrub -Type Scrubbing -Start "02:00" -DurationHours 6 -Days Sunday -Memory 75 -Priority Normal
Immediately start a manual deduplication optimisation job (useful after enabling deduplication on a volume with existing data):
Start-DedupJob -Volume D: -Type Optimization
Step 5: Monitor Deduplication Progress and Savings
Monitor the current status and savings achieved by deduplication on each enabled volume:
Get-DedupStatus -Volume D: | Format-List
Key fields to review: SavedSpace (bytes saved), SavingsRate (percentage), OptimizedFiles (number of files processed), InPolicyFiles (files eligible but not yet processed), and LastOptimizationTime.
Check running deduplication jobs:
Get-DedupJob
View deduplication statistics for all enabled volumes:
Get-DedupVolume | Format-Table Volume, Enabled, SavedSpace, SavingsRate, LastOptimizationTime -AutoSize
To see detailed processing statistics from the last completed job:
Get-WinEvent -LogName "Microsoft-Windows-Deduplication/Operational" | Where-Object {$_.LevelDisplayName -eq "Information"} | Select-Object TimeCreated, Message | Format-List | More
Step 6: Manage the Chunk Store
The deduplication chunk store is located in the System Volume Information folder on the deduplicated volume. Monitor chunk store health:
Get-DedupStatus -Volume D: | Select-Object Volume, ChunkStoreFileCount, ChunkStoreSize, ChunkStoreFreeSpace
If corruption is detected or deduplication behaves unexpectedly, run a scrubbing job to repair the chunk store:
Start-DedupJob -Volume D: -Type Scrubbing
Run garbage collection to reclaim space after large deletions:
Start-DedupJob -Volume D: -Type GarbageCollection
Step 7: Unoptimize and Disable Deduplication
If you need to disable deduplication and restore all files to their original, non-deduplicated state (for example, before migrating a volume to a server without the feature), run the unoptimisation job:
Start-DedupJob -Volume D: -Type Unoptimization
This job reverses all deduplication on the volume. It requires sufficient free space to expand deduplicated files. Monitor progress:
Get-DedupJob -Volume D:
After unoptimisation completes, disable deduplication on the volume:
Disable-DedupVolume -Volume D:
Step 8: Verify Backup Compatibility
Files stored in a deduplicated state on disk are transparently read as their full-size content by applications and backup software. However, to ensure backup software backs up the logical content (not the deduplicated chunks), verify that the backup software explicitly supports Windows Server 2012 R2 deduplication. Windows Server Backup handles deduplicated volumes correctly. For third-party backup products, check vendor documentation for deduplication support flags.
To verify file accessibility after deduplication:
# Check if a specific file is deduplicated
$file = Get-Item "D:FilesSampleDocument.docx"
$file | Get-FileHash -Algorithm SHA256
Summary
Data Deduplication on Windows Server 2012 R2 delivers significant storage savings for file server, VDI, and backup volumes with minimal administrative overhead. The three job types — Optimisation, Garbage Collection, and Scrubbing — work together to maintain an efficient and healthy chunk store. By scheduling jobs during off-peak hours, setting appropriate file age minimums, and monitoring savings rates via PowerShell, organisations can realise substantial cost savings on storage infrastructure while maintaining full data integrity and accessibility.