Enable Deduplication on NTFS Volumes

Maybe you’ve already hear that Server 2012 has deduplication for NTFS integrated by just installing the file server role and selecting deduplication. It’s not activated by just installing it, but not really hard to activate too.


Before starting, the following conditions must be met

  • It must be a NTFS volume; ReFS is not supported
  • There’s some free space, I would recomment to have at least 10%
  • only fixed disks are supported, no USB and other removable ones
  • system and boot volumes are not supported

Q: How do I know my volume’s a good candidate for dedup?

A: There’s a evaluation tool on board of Server 2012, you can get usage help by just typing¬† ddpeval on a command line. In my case, I’ve evaluated just a subfolder that uses 1TB diskspace:

12-14-2012 8-53-58 AM

More about preparing for Dedup and ddpeval @ http://technet.microsoft.com/en-us/library/hh831700.aspx

Enable Deduplication for a Volume

Assuming you have a disk D: that has a lot of data on it that maybe’s good candidate for dedup. To start deduplicating data just open a PowerShell Console as elevated Administrator and hit this commands.

Enable-DedupVolume D:
Set-DedupVolume D: -MinimumFileAgeDays 1

The first command activates deduplication on Volume D:, the second tells dedup to start after a file’s accessed day in past. Default would be 5 days, but I prefer to directly dedup files after one day.

Deduplication data is stored in the “System Volume Information” Folder at the root of the volume in subfolder “dedup”. A lot of files there are named *chunk* and represent chunks of original files.

More about the PowerShell cmdlets @ http://technet.microsoft.com/en-us/library/hh848450.aspx

Open Questions

  • what does happen if I move a deduplicated NTFS Volume to an older Server, i.e. 2008 r2 or whatever?
  • is there a way to get Deduplication for Server 2008 r2 too?


Source: http://technet.microsoft.com/en-us/library/hh831434.aspx

Windows Update error 800B0001

I’ve done some quick research with Google and found the following.


If you receive Windows Update error 800b0001, it means that Windows Update or Microsoft Update cannot determine the cryptographic service provider, or a file Windows Update requires (named catalog store) is corrupted. The System Update Readiness Tool can correct some conditions that cause this error.

In Article KB947821 they explain a way in Server 2012 and Win8 to use dism to scan the image health. For “older” Operating Systems, there’s a Tool that can help repair Windows Update.


So in Server 2012 and Win8, just run the following commands as elevated admin:

DISM.exe /Online /Cleanup-image /Scanhealth
DISM.exe /Online /Cleanup-image /Restorehealth

Run Windows Update again, Error hopefully solved.


Windows 8 Memory Management

Since Windows 8, there are now two Swapfiles: pagefile.sys and swapfile.sys.


Until today, this file was at least as big as your physical memory. Per default, windows sized this file like RAM*1.5. This also was to reserve enough space for the per default enabled kernel memory dump (system properties -> advanced -> startup and recovery).

On Windows 8 there’s a new option to configure the memory dump called “automatic memory dump”. Automatic means if there’s enough space at the moment of the crash, it’ll do a full dump; if not, Windows just writes a small dump.

Source: http://social.technet.microsoft.com/Forums/en-US/W8ITProPreRel/thread/6666c3ff-c770-4e47-a4c3-707d85793c9a


Source: http://www.windowsitpro.com/article/windows8/swapfilesys-143522

swapfile.sys is a system controller file, normally around 256MB. It’s used by Metro style applications that don’t fit the traditional paging characteristics (such as usage pattern, growth, space reservation) of pagefile.sys. One example of swapfile.sys usage is the suspend/resume of Metro-style applications; however, this is not the only use.

You’ll find more detailed technical description here:

About hiberfil.sys

This file was as huge as the total amount of RAM installed in your computer. Now it will be sized for 75% of the physical memory but only has 10-15% of that size of data in it. That’s because of two main things: (1) the traditional desktop only gets loaded after a user explicitly needs it. This reduces the Memory usage of the Kernel. And (2) Windows Quick-Boot (“clean slate”) closes User sessions before shutting the computer down.

To change the size of hiberfil.sys use this command:

powercfg /hibernate /size

To “full”-shutdown the computer:

shutdown /s /full /t 0

Memory Deduplication

As explained in the MSDN Blog for Windows 8, the MS developers implemented a background job that searches for memory of Applications, that is allocated for future use and initialized with all the same value. As they noticed, applications may never actually use this memory because it’s there waiting to be used for a function that maybe never gets invoked. So if multiple applications are doing this, there’s redundant memory.

The technique’s called “Memory combining” and is already known on ESX servers where redundant copies of memory are combined once to save physical memory. VMware calls it “shared memory”. As soon as the only copy of memory gets modifies by an application, the modified data gets a private copy of it. As written in the Blog: “All of this happens under the covers in the memory manager, with no impact on applications.”

Source: http://blogs.msdn.com/b/b8/archive/2011/10/07/reducing-runtime-memory-in-windows-8.aspx

Other ways to reduce memory consumption

There’s a new Startup Mode for Windows Services called “start on demand”. Those services only get started if they’re triggered by the OS. An example for this could be a newly plugged in USB device.

Install Windows 8 on a USB Stick

Prepare a USB Stick

To start from a USB Stick, it must be made bootable and formatted with ntfs. To do so, use diskpart as described in my other blog post here but use “format fs=ntfs quick” instead of fat32 filesystem.

Install Windows using ImageX

As you may now, Windows ISO Files / DVD-Roms contain an image file with the contents of the C:\ Partition. Now to install Windows 8 it’s only needed to unpack the filesystem to the USB Stick and create a Bootloader.

To make it easier, I’ve used the GUI Version of ImageX from AutoScript.com. In this Tool there’s a Tab called “Apply” where you can direct to the install.wim Image file and select the USB Stick as destination. By applying, GImageX extracts the filesystem to the Stick.

  1. Extract “install.wim” from the Windows 8 ISO file, Folder “sources” to a temporary location on your computer
  2. Use a tools like GImageX to Apply “install.wim” to the USB Stick
  3. Open CMD with elevated rights
  4. enter “bcdboot e:\windows /s e:”, where e:\ is your USB stick’s drive letter



Hide User Accounts at Windows Logon Screen

On some Computer installations, I prefer to cread two user accounts like “User” and “UserAdmin” to have the Admin Rights still separated even if UAC is implemented. This gives you the advantage that windows asks for a password before any program gets elevated rights and ensures that you don’t only click on yes as usual. In my oppinion it’s more secure to work this way for people that have less experience on computers.

But if I create this additional account, that account is also visible as logon account on startup. To prevent this account being listed there, I had to change the following Registry key:

  • Open “HKLM\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon
  • Create a Subkey “.\SpecialAccounts
  • Create a Subkey “.\SpecialAccounts\UserList

The whole new key should look like this:


Now you can create a DWORD with the name of the user you want to change the setting. As an example, let’s use “UserAdmin” here:

Now you can use the following Values for that DWORD:

0 = hide User Account
1 = show User Account

Windows temporary profile

If you’re logging in to a computer and get a message telling you “you’ve been logged on with a temporary profile”, you can solve that problem by just rebooting the computer. But sometimes, there’s a bigger fault in background. In this case, a colleague just gave me this hint:

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

Under the ProfileList subkey, delete the subkey that is named <<SID>>.bak

Cleaning up disk space

Cleaning up disk space by deleteing old Windows Updates was more easy on Windows XP than Win7 now. Updates are stored under the “%windir%\winsxs” folder, where you should not delete anything if you love your stable operating system.

A colleague just told me he found the trick to cleanup those updates, it’s just starting the following command under Win7 / Server 2008r2:

dism /online /cleanup-image /spsuperseded

This command cleans up the %windir%\winsxs folder which holds (among others) files for Service Packs. The only drawback to this procedure is that once executed you won’t be able to uninstall the Service Pack(s) any longer – so use it cautiously and at your own risk.

— edit 05-Nov-2012

Windows Vista and Server 2008 (r1) do not have dism included. To cleanup WinSxs there you can use “compcln.exe” instead, it removes all Service Pack files. Take care, you’ll not be able to downgrade from SP2 to SP1 after running this command.

— edit May-2014

There is an update from Microsoft available (KB2852386)¬†that makes the Windows’ Cleanup Diskspace Feature able to cleanup WinSXS Folder files. Just install the update and follow the instructions in the KB Article.