While shadow copies can be enabled on a volume and previous versions accessed using the GUI, Windows Server 2003 also includes a command-line utility called vssadmin that can be used to manage shadow copies on the server side. But what about using the command line to manage previous versions of files from the desktop end? The Windows Server 2003 Resource Kit includes a tool called volrest that can be employed for just that purpose; you can use it to list or search for previous versions of a file and restore such versions to the same or different locations.
To use volrest, you first need to know the UNC path to the shared folder; for example, \\test220\reports would be the Reports share on the file server named SRV220. Let's say we want to access a previous version of the above file doc.4.rtf, which is located within the Annual Reports 2004 folder in this share. In this case, the UNC path to this particular file would be "\\test220\reports\Annual Reports 2004\doc.4.rtf"; the quotation marks are needed because of spaces in the pathname. To list all available versions of this document, just type the following at the command line:
C:\>volrest \\test220\reports\Annual Reports 2004\doc.4.rtf
To recover a particular version of this file, just type:
C:\>volrest "\\test220\reports\Annual Reports 2004\doc.4.rtf" /r:E:\Stuff
This will restore all previous versions of the file to a temporary folder (here E:\Stuff) and you can then copy the version of the file you want to keep to your home folder and make it your new working copy of the document.