Using Powershell to manage Data Deduplication | Server 2012 and Windows 8

Here is a quick guide on how to quickly check how well and when data deduplication will occur on Server 2012, and Windows 8 (if you have that installed, covered in  another  guide). Deduplication is a great way to save tons of space, its also built into Windows Server 2012 and can be added to Windows 8.

Issue – (any of the below)
I want to see how well deduplication is working,
I want to see when its running,
I want to force a data deduplication right now.
I hacked Windows 8 and dont have the server manager to see my disk space savings.
Windows 2012’s Server Manager takes a year to open, I just want to see some stats here people.

Solution –  First open up PowerShell, if you have removed it from the task bar then do a search for it then open it up.

/ ! \ It is important to note, you can not enable deduplication on the partition that windows is on. This will throw an error when you attempt to try and do this.

Once powershell is open we will be using the Get-Dedup commands see below for them.

First if you have not already enabled dedupe on a disk thats ok we can do that now. I will be using the drive letter E:\ as my example you will fill in your own disk where ever you see E:\ Type in Enable-DedupVolume E:

Set-DedupVolume E: -MinimumFileAgeDays 0 (This will set deduplication to run 24/7 as the file age is set to nothing this may cause high resource usage if you have lots of storage as it constly will try to  optimize  the system, I  recommended  3 days for a home file server. Microsoft  recommends 5 days.)

Start-DedupJob E: –Type Optimization (Now we want to run a single dedupe job to see how much we can save, since I dont want to wait for the system to check the age on all my files on my disk so lets just run it now. Give it about a  minute  to kick off the job and then we will check and see if its running.)

3-6-2013 2-57-18 PMGet-DedupStatus (This will output a simple list of your disks and how much space you have saved on them).


There you go! Dont forget to set the file age on the command Set-DedupVolume E: -MinimumFileAgeDays 5 or it will run constantly in the background! If your looking to add data deduplication to Windows 8 follow my guide here.




Leave a Reply

Your email address will not be published. Required fields are marked *