To back up and restore IIS 6:
- Open the IIS Manager.
- Right-click the machine labeled as Local Computer.
- Click All Tasks > Backup/Restore Configuration > Create Backup.
- Type a name for the backed up configuration and then click OK.
- Click Close.
- Open the %windir%\system32\inetsrv\MetaBack directory and copy the created backup to a local folder.
- Reinstall IIS.
- Open the local folder and copy the backup file to the %windir%\system32\inetsrv\MetaBack directory.
- Open the IIS Manager.
- Right-click the machine labeled as Local computer.
- Click All Tasks > Backup/Restore Configuration.
- Select the backup name and then click Restore > Yes > OK.
- Click Close.
To back up and restore IIS 7 or IIS 8:
- Open cmd.exe.
- Navigate to %windir%\system32\inetsrv\.
- Execute following command to back up configuration:
appcmd.exe add backup <backupname>.
- Open the %windir%\system32\inetsrv\backup directory and copy the backup folder to a local folder.
- Reinstall IIS.
- Open the local folder and copy the backup folder to the %windir%\system32\inetsrv\backup directory.
- Execute following command to back up configuration:
appcmd.exe restore backup <backupname>