Solution 1:

You should be able to do:

cd %systemroot%\system32\inetsrv\

and then

appcmd list site /xml | appcmd delete site /in

To delete all of the sites, although I'm not sure. If it works it would be faster.

Learn more about piping appcmd here: http://blogs.iis.net/ksingla/archive/2007/06/17/things-you-can-do-by-piping-appcmd-commands.aspx

Solution 2:

You can use the IIS appcmd command to remove a site automatically like this:

%systemroot%\system32\inetsrv\appcmd delete site "Website1"

You can repeat the command in a script to delete specific website names whenever you run the script. Create a file called DeleteSites.bat and paste the following code inside:

@echo off
cd %systemroot%\system32\inetsrv\

appcmd delete site "Website1"
appcmd delete site "Website2"
appcmd delete site "Website3"
appcmd delete site "Website4"
appcmd delete site "Website5"

Save the file, and then double-click it. That should delete the websites listed every time you run the script.

Here's a useful article on iis.net about using the appcmd to automate a lot of IIS tasks.