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.
|Vssadmin delete shadows||Deletes volume shadow copies|
|Vssadmin list providers||List registered volume shadow copy providers|
|Vssadmin list shadows||List existing volume shadow copies|
|Vssadmin list shadowstorage||List volume shadow copy storage associations|
|Vssadmin list writers||List subscribed volume shadow copy writers|
|Vssadmin resize shadowstorage||Resize a volume shadow copy storage association|
|Vssadmin list volumes||List volumes eligible for shadow copies|
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.
|For=VolumeSpec||Specifies the volume for which the shadow copy is to be deleted|
|/Oldest||Deletes only the oldest shadow copy.|
|/Quiet||Keeps the command from displaying messages while it is running|
|/All||Deletes all of the shadow copies for the specified volume|
|/shadow=<ShadowID>||Deletes the shadow copy specified by ShadowID. To get the shadow copy ID, use the "vssadmin list shadows" command. When you type a shadow copy ID, use the following format, where each X represents a hexadecimal character: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX|
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.