Commands available with VSSadmin
VSSadmin comes with a suite of associated commands. Table I lists the commands and their function. Vista Home Premium lacks some of these. The commands may have additional switches. Note that this command should be run as an administrator.
Control the space used by shadow copies with VSSadmin
There are several applications of VSSadmin that might be encountered by an average PC user. One would be to determine how much space is being used by volume shadow copies and another would be controlling how much space is used. Here are the commands and requisite syntax.
Find out how much space shadow copies occupy
To find out how much space System \Restore is using, open the command prompt as administrator and enter
vssadmin list shadowstorage
Reduce the space used by System Restore with VSSadmin
System Restore can use up to 15% of a hard drive for its backup files (shadow storage). As hard drives get ever bigger, that becomes a lot of space. The command "vssadmin" can be used to administer settings for System Restore. To control the space allocation, open a command prompt with administrator privileges and enter
vssadmin Resize ShadowStorage /For=C: /On=C: /Maxsize=[n] For [n] enter the desired size in MB or GB. The units must be stated: for example, "Maxsize=500MB" or "Maxsize=2GB". The example is for the C: volume but other
volumes can be specified. WARNING! This will delete all your old Restore Points!
Delete shadow copies
If for some reason, you wish to delete shadow copies, here are some options.
vssadmin Delete Shadows /For=VolumeSpec [/Oldest] [/Quiet]
vssadmin Delete Shadows /Shadow=ShadowID [/Quiet]
vssadmin Delete Shadows /All
Table II explains the various switches and syntax.
Here is an example command. It deletes the oldest shadow copy on the C: volume.
vssadmin Delete Shadows /For=C: /Oldest
In general, care should be exercised when deleting shadow copies.
VSSadmin in Windows XP
If you look, you can find VSSadmin in the command line for Windows XP Professional but it isn't of any great use there.