Enable Disk Cleanup on Server 2008 R2 Without Using Add Features


You’re running out of space on a computer running Server 2008 R2, but cannot find the Disk Cleanup tool. You know you can add it using Add Features > Desktop Experience, but you just want Disk Cleanup; not the other stuff.


You need to copy a few files from C:\Windows\winsxs.
Here is a batch script to copy the files to the correct locations, and also pin Disk Cleanup to the Start Menu (using VBScript called PinItem.vbs, shown below): [Read more…]

Copy Veeam backups to USB drive

As we are still rolling out VMware and Veeam B&R throughout our offices, we are not yet in a position to set up replication.

Until we are ready, I thought it was a good idea to at least backup the Veeam backup repository to USB3 drives, which would be rotated and taken offsite daily.

Initially I setup a ‘Veeam File Copy’ job, but later noticed it was taking ages to copy the new incremental files. It seems ‘Veeam File Copy’ jobs do not just copy the new files, but all files every time; not what I wanted.

[Read more…]

Useful Windows commands and variables

I’ve got loads of commands and variables that I use periodically, but I forget them often.

I only have a few that spring to mind now, but I’ll add to this when I remember more!

[Read more…]

The best way to copy files using built-in commands – Robocopy

I’ve tried countless ways of copying and syncing files in the past, the last being the venerable SyncBack backup program.

Although it served its purpose, these days I’m not a fan of installing more applications than absolutely needed, so I thought I’d explore built-in options again.

I’ve used xcopy previously, but I wanted to try something new. Enter Robocopy…and no, it has nothing to do with this guy:

Robocopy was not created by Robocop!

[Read more…]

Using data and time in batch files

If you need to use the current date and time within batch files, I find this code very useful:


For instance, say you’re moving or copying a file somewhere and you want to rename it with today’s date and time, you could set a filename variable like so:

set filename=%date:~-4,4%-%date:~-7,2%-%date:~-10,2%#%time::=-%

This would output a string with the format yyyy-mm-dd#hh-mm-ss.ms (ms being micro-seconds):


To add the computer name to the string use: