If you've backed up your metabase, and experimented with WSH and corrupted the configuration on all of your Web sites, you may decide that you really would like to learn how to retrieve backups. This tool is provided for just such a situation.
As you'd expect, the method to restore the metabase is simply called Restore, and is accessed at the same IIS://LocalHost node of the metabase that the Backup method was. Restore takes several parameters, including the location string and the version number. Again, there are several constants that can be used in place of an explicit version number. This sample uses as a default one of those magic numbers, &HFFFFFFFE (-2 decimal), which indicates that the server should look for, and restore from, the highest numbered version of the specified backup location set.
This sample is provided for educational purposes only. It has not been tested in a production environment, and Microsoft® will not provide technical support for it.
This script is available in the Internet services directory, at ...\iissamples\sdk\admin\metabackenum.vbs.